-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex3.py
31 lines (29 loc) · 1.32 KB
/
ex3.py
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
26
27
28
29
30
31
# it prints text
print("I will now count my chickens:")
# it prints text then following a math operation
print("Hens", 25.0 + 30.0 / 6.0)
# it prints text then following a math operation
print("Roosters", 100.0 - 25.0 * 3.0 % 4.0)
# it prints text
print("Now I will count the eggs:")
# it prints the anwer of a math operation
print(3.0 + 2.0 + 1.0 - 5.0 + 4.0 % 2.0 - 1.0 / 4.0 + 6.0)
# it prints text
print("Is it true that 3 + 2 < 5 - 7?")
# it prints whether the inequality between 2 math operations is true or false
print(3.0 + 2.0 < 5.0 - 7.0)
# it prints texts then prints whether the inequality between 2 math operations is true or false
print("What is 3 + 2?", 3.0 + 2.0)
# it prints texts then prints whether the inequality between 2 math operations is true or false
print("What is 5 - 7?", 5.0 - 7.0)
# it prints text
print("Oh, that's why it's False.")
# it prints text
print("How about some more.")
# it prints texts then prints whether the inequality between 2 math operations is true or false
print("Is it greater?", 5.0 > -2.0)
# it prints texts then prints whether the inequality between 2 math operations is true or false
print("Is it greater or equal?", 5.0 >= -2.0)
# it prints texts then prints whether the inequality between 2 math operations is true or false
print("Is it less or equal?", 5.0 <= -2.0)
print(6.0+3.0/2.0*5.0%4.0)