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 代碼
刪除
恢復自動保存:
?