Skip to content

Commit 3dc901c

Browse files
committed
added exercise 19
1 parent 3bd1b74 commit 3dc901c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

ex19.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
def cheese_and_crackers(cheese_count, boxes_of_crackers):
2+
print "You have %d cheeeses!" % cheese_count
3+
print "You have %d boxes of crackers!" % boxes_of_crackers
4+
print "Man that's enough for a party!"
5+
print "Get a blanket.\n"
6+
7+
print "We can just give the function numbers directly:"
8+
cheese_and_crackers(20, 30)
9+
10+
11+
print "OR, we can use variables from our script:"
12+
amount_of_cheese = 10
13+
amount_of_crackers = 50
14+
15+
cheese_and_crackers(amount_of_cheese, amount_of_crackers)
16+
17+
18+
print "We can even to math inside too:"
19+
cheese_and_crackers(10 + 20, 5 + 6)
20+
21+
22+
print "And we can combine the two, variables and math:"
23+
cheese_and_crackers(amount_of_cheese + 100, amount_of_crackers + 1000)

0 commit comments

Comments
 (0)