- 46
- 0
- 约2.89千字
- 约 6页
- 2020-12-12 发布于浙江
- 举报
Chapter 4 Selections
1. , =, ==, !=, , =
2. Yes. i becomes 1, j becomes 0, b1 becomes True, and b2 becomes Flase.
3. random.randrange(0, 20) or random.randint(0, 19)
4. random.randrange(10, 20) or random.randint(10, 19)
5. random.randrange(10, 50 + 1) or random.randint(10, 50)
6. random.randrange(0, 2) or random.randint(0, 1)
7.
if y 0:
x = 1
8.
if score 90:
pay *= 1.03
9.
if score 90:
pay *= 1.03
else:
pay *= 1.01
10.
If number is 30,
(a) displays
30 is even
30 is odd
(b) displays
30 is even
If number is 35,
(a) displays
35 is odd
(b) displays
35 is
原创力文档

文档评论(0)