1) for i in range(-3), how many times this loop will run ? a) 0 b) 1 c) infinite d) error 2) for i in [1,2,3]:, how many times a loop run ? a) 0 b) 1 c) 2 d) 3 3) for loop in python are work on a) Range b) Iteration c) Both of the above d) None of the above 4) For loop in python is a) Entry control loop b) Exit control loop c) Simple loop d) None of the above 5) How many times it will print the statement ?, for i in range(100): print(i) a) 101 b) 99 c) 100 d) 0 6) In which of the following loop in python, we can check the condition ? a) for loop b) while loop c) do while loop d) None of the above 7) It is possible to create a loop using goto statement in python ? a) Yes b) No c) Sometimes d) None of the above 8) To break the infinite loop , which keyword we use ? a) continue b) break c) exit d) None of the above 9) What is the final value of the i after this, for i in range(3): pass a) 1 b) 2 c) 3 d) 0 10) What we put at the last of the loop ? a) Semicolon b) Colon c) Comma d) None of the above
0%
Python Loop Quiz
共享
共享
共享
由
Ash22k
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?