1) Which symbol is used for “not equal to” in Python? a) == b) != c) <= d) >= 2) What will this code print? a) True b) False c) Error d) Nothing 3) Which of these is a valid variable name in Python? a) 2value b) first-name c) first_name d) first name 4) What happens if you forget the colon : in an if statement? a) Python ignores it b) It runs anyway c) SyntaxError d) Nothing happens 5) What does this expression evaluate to? a) True b) False c) Yes d) No 6) What is the default data type of input() in Python? a) String b) Integer c) Float d) Bool 7) Which keyword is used to add an alternative condition in Python? a) else b) else if c) elif d) elseif 8) What is the correct way to write a single-line comment in Python? a) // This is a comment b) /* This is a comment */ c) ''' This is a comment d) # This is a comment 9) What will the following code output? a) 8 b) 53 c) 5 + 3 d) "5 + 3" 10) What is the output of this code? a) A b) B c) C d) Nothing
0%
Python Intro Quiz
共享
共享
共享
由
Karenahmed81
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?