首页 > 其他 > 详细

Exercise 3

时间:2019-09-26 15:40:41      阅读:95      评论:0      收藏:0      [点我收藏+]

+ plus

- minus

/ slash

* asterisk

% percent / modulus(“X divided by Y with J remaining.”

For example, “100 divided by 16 with 4 remaining.” The result of % is the J part, or the remaining part.)

< less-than

> greater-than

<= less-than-equal 

>=  greater-than-equal

print("I will now count my chickens:")

print("Hens", 25 + 30 / 6)
print("Roosters", 100 - 25 * 3 % 4)

print("Now I will count the eggs:")

print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)

print("Is is true that 3 + 2 < 5 - 7?")

print(3 + 2 < 5 - 7)

print("What is 3 +2?", 3 + 2)
print("What is 5 - 7?", 5 - 7)

print("Oh, that‘s why it‘s False.")

print("How about some more.")

print("Is is greater?", 5 > -2)
print("Is is greater or equal?", 5>= -2)
print("Is it less or equal?", 5 <= -2)

 

print("Now I will count my pens:")
print("Markers", 1 + 2)
print("Pencils", 2 * 2 + 1)
print("Now I will count my notebooks:")
print(8 % 3 + 6 - 10 / 5)

 2019-09-26

19:25:01

Exercise 3

原文:https://www.cnblogs.com/petitherisson/p/11590665.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!