-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex3.py
More file actions
30 lines (20 loc) · 726 Bytes
/
ex3.py
File metadata and controls
30 lines (20 loc) · 726 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
# Print the string
print "I will now count my chickens:"
# print hens, add 25 and 30 divide by 6
print "Hens", 25.0 + 30.0 / 6.0
print "Roosters", 100.0 - 25.0 * 3.0 % 4.0
# print a string
print "Now i will count the eggs:"
# add 3, 2, 1 subtract 5, add the remainder of 4/2 subtract 1 divide by 10
print 3.0 + 2.0 + 1.0 - 5.0 + 4.0 % 2.0 - 1.0 / 4.0 +6.0
# print the string
print "Is it true that 3 + 2 < 5 - 7?"
# return t/f for 3 add 2 less than 5 subtract 7
print 3 + 2 < 5 - 7
print "What is 3 + 2?", 3 + 2
print "What is 5 - 7?", 5 - 7
print "Oh, that's whhy 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