def cheese_and_crackers(cheese_count,boxes_of_crackers):
print("You have {0} cheeses.".format(cheese_count))
print("You have {0} boxes of crackers!".format(boxes_of_crackers))
print("Man that'enough for party!")
print("Get a blanket.\n")
print("We can just give the function numbers directly:")
cheese_and_crackers(20,30)
print("OR,we can use variables from our scrit:")
amount_of_cheese = 10
amount_of_crackers = 50
cheese_and_crackers(amount_of_cheese,amount_of_crackers)
print("We can even do math inside too")
cheese_and_crackers(10+20,5+6)
print("And we can combine the two,variables and math:")
cheese_and_crackers(amount_of_cheese+100,amount_of_crackers+1000)
Pythonista20190316
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 本文章转载于搜狗测试 对于移动app,性能优化是永无止境的话题,而在性能指标中,耗电量又是重中之重,android...