-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex19.py
More file actions
25 lines (16 loc) · 700 Bytes
/
ex19.py
File metadata and controls
25 lines (16 loc) · 700 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#http://learnpythonthehardway.org/book/ex19.html
def cheese_and_crackers(cheese_count, boxes_of_crackers):
print("You have %d cheeses!" % cheese_count)
print("You have %d boxes of crackers!" % boxes_of_crackers)
print("Yaman Rasstafari")
print("My money is long")
print("give the func number directly:")
cheese_and_crackers(20,30)
print("OR, we can use variable from our script:")
amountofcheese=10
amountofcrackers=50
cheese_and_crackers(amountofcheese, amountofcrackers)
print("We can even do math inside too:")
cheese_and_crackers(10 + 20, 5 + 3)
print("And we can combine the two, variable and math:")
cheese_and_crackers(amountofcheese + 20, amountofcrackers + 300)