ex3.py

来源:互联网 发布:宏业斯维尔软件 编辑:程序博客网 时间:2024/05/22 17:45

ex3.py


print "I will now count my chickens: " # print what I want to doprint "Hens ", 25 + 30 / 6 # print the amount of hensprint "Roosters", 100 - 25 * 3 % 4 # print the amount of roostersprint "Now I will count the eggs:" # print what I will do nextprint 3 + 2 + 1 - 5 + 4 % 2 - 1/4 + 6 # print the amount of eggsprint "Is it true that 3 + 2 < 5 - 7?" # caculate somethingprint 3 + 2 < 5 - 7 # print true or falseprint "What 3 + 2?", 3 + 2 # print a resultprint "What 5 - 7?", 5 - 7 # print a resultprint "Oh, that's why it's False." # print a wordprint "How about some more." # print another wordprint "Is it greater?", 5 > -2 # print true or false print "Is it greater or equal?", 5 >= -2 # print true or false print "Is it less or equal?", 5 <= -2 # print true or false 


python中的数学运算

0 0
原创粉丝点击