1) What does a variable store in a program? a) Only numbers b) Data that can change c) Only text d) A fixed value 2) What is an algorithm? a) A type of data type b) A step-by-step set of instructions c) A programming error d) A variable name 3) Which of the following is NOT a data type in Python? a) Integer b) String c) Real d) Fraction 4) What does the operator == do in Python? a) Assigns a value b) Adds numbers c) Compares two values d) Checks for inequality 5) What is the purpose of an if statement? a) To repeat code b) To make a decision c) To define a function d) To create a list 6) What keyword is used to start a loop that repeats a fixed number of times? a) while b) repeat c) for d) loop 7) What is a syntax error? a) When the code runs forever b) When the program crashes during use c) When the code breaks programming rules d) When output is wrong 8) What does the command input() do? a) Outputs text b) Ends the program c) Adds two numbers d) Gets text from the user 9) What is a Boolean value? a) True or False b) Yes or No c) 1 or 0 d) All of the above 10) What symbol starts a comment in Python? a) // b) # c) /* d) -- 11) What is a constant? a) A value that stays the same b) A variable that changes c) A loop name d) A function name 12) What is a data type? a) Type of computer b) Type of input device c) Type of data a variable can hold d) Type of loop 13) What does print() do in Python? a) Receives input b) Displays output c) Adds numbers d) Creates a list 14) What happens when you use input() in Python? a) Program ends b) Data is printed c) A list is created d) User is asked to type something 15) What is a data value? a) The actual piece of information stored in memory b) The name of a variable c) A function d) The syntax of a statement 16) What does the not operator do? a) Checks if both are true b) Reverses a condition c) Joins two conditions d) Adds numbers 17) What keyword lets you add another condition after an if? a) elif b) else if c) also d) if 18) What keyword runs code if no other condition is true? a) if b) elif c) else d) endif
0%
Programming Fundamentals
共享
共享
共享
由
Hvalli
编辑内容
打印
嵌入
更多
作业
排行榜
显示更多
显示更少
此排行榜当前是私人享有。单击
,共享
使其公开。
资源所有者已禁用此排行榜。
此排行榜被禁用,因为您的选择与资源所有者不同。
还原选项
飞果
是一个开放式模板。它不会为排行榜生成分数。
需要登录
视觉风格
字体
需要订阅
选项
切换模板
显示所有
播放活动时将显示更多格式。
打开成绩
复制链接
QR 代码
删除
恢复自动保存:
?