NEW
Font size
WorksheetsPython Programming 2nd Quarter Long Quiz
Total questions: 20
Worksheet time: 10mins
Which function is used to take input from the user in Python?
read()
input()
scanf()
get()
Which function is used to display text to the user?
display()
echo()
print()
show()
What type of data does the input() function return by default?
Integer
Float
String
Boolean
Which parameter of the print() function prevents a new line after printing?
stop
end
continue
break
Which operator performs integer division in Python?
/
//
%
**
Which operator is used to find the remainder of a division?
/
//
%
**
Which arithmetic operator has the highest precedence?
+
*
/
**
What is the result type of the expression 5 / 2 in Python?
Integer
Float
String
Boolean
Which keyword begins a conditional statement?
else
if
when
check
What keyword checks another condition when the first if is false?
elseif
elif
else if
next
The else block executes when:
The if condition is true
The if and all elif conditions are false
The program ends
An error occurs
Which symbol is used for equality comparison in Python?
=
==
!=
===
Which logical operator is used when both conditions must be true?
and
or
not
xor
Which operator negates a condition?
!
~
not
-
Which keyword creates a loop that repeats while a condition is true?
for
loop
while
repeat
Which function is commonly used with for loops to generate numbers?
sequence()
numbers()
range()
count()
What does the break statement do inside a loop?
Skips the current iteration
Ends the entire loop immediately
Restarts the loop
Ends the program
What does the continue statement do?
Exits the program
Skips the rest of the code in the loop and goes to the next iteration
Stops all loops
Repeats the previous iteration
Which method adds a new element to the end of a list?
push()
add()
append()
insert()
What is true about tuples in Python?
They are mutable
They can be changed after creation
They are immutable
They cannot store strings
