-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathex3.py
More file actions
32 lines (23 loc) · 949 Bytes
/
ex3.py
File metadata and controls
32 lines (23 loc) · 949 Bytes
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
32
# prints out the text in the quotes
print("I will now count my chickens:")
# prints out the text and the result of the math problem
print("Hens", 25 + 30 / 6)
print("Roosters", 100.0 - 25 * 3 % 4)
# prints out the text in the quotes
print("I will now count the eggs:")
# prints out the result of the math problem
print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)
# prints out the text in the quotes
print("Is it true that 3 + 2 < 5 - 7?")
# prints out true or false based on whether the comparison is correct or not
print(3.0 + 2 < 5 - 7)
print("What is 3 + 2?", 3.0 + 2)
print("What is 5 - 7?", 5.0 - 7)
# prints out the text in the quotes
print("Oh, that's why it's False.")
# prints out the text in the quotes
print("How about some more.")
# prints out the text and true or false depending on whether the comparison is correct or not
print("Is it greater?", 5 > -2)
print("Is it greater or equal?", 5 >= -2)
print("Is it less or equal?", 5 <= -2)