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

Programming Fundamentals

על ידי

לוח תוצאות מובילות

סגנון חזותי

אפשרויות

החלף תבנית

האם לשחזר את הנתונים שנשמרו באופן אוטומטי: ?