-
Notifications
You must be signed in to change notification settings - Fork 0
/
ex3ec1.py
executable file
·42 lines (31 loc) · 1.41 KB
/
ex3ec1.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
38
39
40
41
42
# print a statement about counting chickens
print "I will now count my chickens:"
# print math, which is hard, about my Hens
print "Hens", 25 + 30 / 6
# print math, which is also hard, about my Roosters
print "Roosters", 100-25 * 3 % 4
# tell the whole world that i'm about to count eggs
print "Now I will count the eggs:"
# i will do science to it http://dresdencodak.com/2008/05/02/copan/
print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6
# oh, another statement of what i'm going to try
print "Is it true that 3 + 2 < 5 - 7?"
# the actual math, returned as a Boolean
print 3 + 2 < 5 - 7
# print statement, followed by integer output
print "What is 3 + 2?", 3 + 2
# print statement, followed by more integer output!
print "What is 5 - 7?", 5 - 7
# print statement, reminding myself of my human fallibility.
print "Oh, that's why it's False."
# print statement, i'm doing more science in a hot second
print "How about some more."
# print statement, followed by a Boolean statement of a math thing
print "Is it greater?", 5 > -2
# print statement, followed by a Boolean statement of ANOTHER math thing
# These thingies are printing True or False, depending on whether the
# preceeding statement was True or False
# five is bigger than minus 2 (ask climent about Celcius) so this will be True
print "Is it greater or equal?", 5 >= -2
# this will be False, as 5 is to the right of -2, like Newt Gingrich
print "Is it less or equal?", 5 <= -2