题目总结

正确答案:A
正确答案:B
正确答案:A
正确答案:B
正确答案:A
正确答案:A
正确答案:B
正确答案:B
正确答案:A
模块及功能
ybc_show
map
fly
round
while
语句格式
:::info
一直循环下去的,叫做无限循环
:::
循环到一定次数会停止的,叫做有限循环
影响循环次数的要素
1.循环条件
2.i(计数变量)的起始数目
3.i(计数变量)自增的数目
示例代码
任务一
import ybc_show as showshow.map(1)show.fly()show.jump()show.fly()show.round()show.clap()
任务二
import ybc_show as showshow.map(2)while True:show.fly()show.round()
任务三
import ybc_show as showshow.map(3)i = 0while i < 5:show.fly()show.round()i=i + 1
课后练习
# 使用while循环打印10次'金币+10'i = 1while i < 11:print('金币+10')i = i + 1
