Python语言程序设计(美-梁勇)第4章习题解答(英文).docVIP

  • 46
  • 0
  • 约2.89千字
  • 约 6页
  • 2020-12-12 发布于浙江
  • 举报

Python语言程序设计(美-梁勇)第4章习题解答(英文).doc

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)

1亿VIP精品文档

相关文档