forked from leighMichaelForrest/lpthw
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ex3.py
37 lines (28 loc) · 1.22 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
32
33
34
35
36
37
# Write "I will now count my chickens" to the screen.
print("I will now count my chickens:")
# Write "Hens: 30.0" to the screen using the formula
print("Hens", 25 + 30 / 6)
# Write "Roosters: 97" to the screen using the formula
print("Roosters", 100 - 25 * 3 % 4)
# Write "Now I will count the eggs:" to the screen.
print("Now I will count the eggs:")
# Write "6.75" to the screen, using the formula.
print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)
# Write "Is it true that 3 + 2 < 5 - 7?" to the screen.
print("Is it true that 3 + 2 < 5 - 7?")
# Print "False" to the screen using the formula.
print(3 + 2 < 5 - 7)
# Print "What is 3 + 2? 5" to the screen, using formula
print("What is 3 + 2?", 3 + 2)
# Print "What is 5 - 7" to the screen, using formula
print("What is 5 - 7?", 5 - 7)
# Write "Oh, that's why it's False" to the screen.
print("Oh, that's why it's False.")
# Write "How about some more." to the screen.
print("How about some more.")
# Write "Is it greater? True" to the screen, using the formula
print("Is it greater?", 5 > -2)
# Write "Is it greater or equal? True" to the screen, using the formula.
print("Is it greater or equal?", 5 >= -2)
# Write "Is it less or equal?" using the formula.
print("Is it less or equal?", 5 <= -2)