+ 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
原文:https://www.cnblogs.com/petitherisson/p/11590665.html