题目总结

image.png
正确答案:A
image.png
正确答案:B
image.png正确答案:Aimage.png
正确答案:B
image.png
正确答案:A
image.png
正确答案:A
image.png
正确答案:B
image.png
正确答案:B
image.png
正确答案:A

模块及功能

ybc_show

map

挑选舞台(地图) 参数为整数,意思为地图编码(挑选地图)

fly

动作,飞 没有参数

round

动作,转圈(回旋) 没有参数

while

语句格式

image.png :::info 一直循环下去的,叫做无限循环 :::

循环到一定次数会停止的,叫做有限循环

影响循环次数的要素

1.循环条件
2.i(计数变量)的起始数目
3.i(计数变量)自增的数目

示例代码

任务一
  1. import ybc_show as show
  2. show.map(1)
  3. show.fly()
  4. show.jump()
  5. show.fly()
  6. show.round()
  7. show.clap()

任务二
  1. import ybc_show as show
  2. show.map(2)
  3. while True:
  4. show.fly()
  5. show.round()

任务三
  1. import ybc_show as show
  2. show.map(3)
  3. i = 0
  4. while i < 5:
  5. show.fly()
  6. show.round()
  7. i=i + 1

课后练习
  1. # 使用while循环打印10次'金币+10'
  2. i = 1
  3. while i < 11:
  4. print('金币+10')
  5. i = i + 1

流程图

1

image.png

2

image.png

课后练习流程图

image.png

知识点总结

U9知识点总结.pdf