Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Homework Thirty

  • Loading branch information...
commit d3c1a219efc8fef311cf6848d27195e32ca6b230 1 parent 6136179
@pdanshov authored
Showing with 33 additions and 0 deletions.
  1. +33 −0 class1/labs/lpthw_ex30.py
View
33 class1/labs/lpthw_ex30.py
@@ -0,0 +1,33 @@
+people = 30
+cars = 40
+buses = 15
+
+
+if cars > people:
+ print "We should take the cars."
+ people += 20
+elif cars < people:
+ print "We should not take the cars."
+ people -= 10
+else:
+ print "We can't decide."
+
+buses += 40
+if buses > cars:
+ print "That's too many buses."
+ buses -= 40
+elif buses < cars:
+ print "Maybe we could take the buses."
+ buses += 25
+else:
+ print "We still can't decide."
+
+if people > buses:
+ print "Alright, let's just take the buses."
+else:
+ print "Fine, let's stay home then."
+
+if cars > people and buses < cars:
+ print "People:",people,"cars:",cars,"Buses:",buses,"True"
+else:
+ print "People:",people,"cars:",cars,"Buses:",buses,"False"
Please sign in to comment.
Something went wrong with that request. Please try again.