1) How do you evaluate an expression in Python? a) Type 'evaluate' first b) Break it into pieces c) Type after >>> prompt d) Use a calculator 2) Which expression multiplies two numbers? a) 4 + 7 b) 4 x 7 c) 4 # 7 d) 4 * 7 3) Evaluate: 3 * 4 * 2 + 8 a) 24 b) 32 c) 40 d) 120 4) Which statement about variables is correct? a) Value never changes b) Must be lowercase c) Must start at zero d) Can hold Booleans 5) What is the purpose of a variable? a) Change future programs b) Combine numbers c) Remember values for later d) Indent source code 6) Which statement initializes a variable? a) Initialise() b) x = 3 c) start() d) finish() 7) If length = 200 and then length = 400 is run: a) Error message b) Error (can't change) c) Value becomes 400 d) Value becomes 600 8) In Python, the input() function: a) Uses a USB key b) Makes input faster c) Returns a string d) Must be called first 9) In Python, the print() function: a) Changes data type b) Displays a result c) Is the last command d) Must be called first 10) A data type with only two values is: a) Integer b) Float c) String d) Boolean
0%
Python Basics Quiz
共享
共享
共享
由
Durschoolcom
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
随堂测验
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
AI增强版:本活动包含AI生成的内容。
了解更多信息。
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?