-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex3.py
More file actions
28 lines (18 loc) · 699 Bytes
/
ex3.py
File metadata and controls
28 lines (18 loc) · 699 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
# Prints string
print " I will now count my chickens:"
# Prints string, adds the values 25 and 30, then divides the result by 6
print "Hens", float(25 + 30 / 6)
# Multiplies 25 by 3, then subtracts 100 by the result and then prints remainder divided by 4
print "Roosters", float(100 - 25 * 3 % 4)
# Adds and subtracts
print "Now I will count the eggs:"
print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6
print "Is it 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 it greater?", 5 > -2
print "Is it greater or equal?", 5 >= -2
print "Is it less or equal?", 5 <= -2