-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex3.py
More file actions
41 lines (31 loc) · 705 Bytes
/
ex3.py
File metadata and controls
41 lines (31 loc) · 705 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
33
34
35
36
37
38
39
40
41
# -*- coding:utf-8 -*-
# 输出一句话
print "I will now count my chickens:"
# 输出 30/6+25=30
print "Hens", 25 + 30 / 6
# 输出 100 - 25 * 3 % 4 = 97
print "Roosters", 100 - 25 * 3 % 4
# 输出一句话
print "Now I will count the eggs:"
# 输出: 7
print 3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6
# False
print "Is it true 3 + 2 < 5 - 7?"
# False
print 3 + 2 < 5 - 7
# 5
print "What is 3 + 2?", 3 + 2
# -2
print "What is 5 - 7?", 5 - 7
# 输出一句话
print "Oh, that's why it's False."
# 输出一句话
print "How about same more."
# Ture
print "Is it greater?", 5 > -2
# Ture
print "Is it greater or equal?", 5 >= -2
# False
print "Is it less or equal?", 5 <= -2
print 7.0 / 4.0
print 7 / 4