NEW
Font size
WorksheetsGrade 8 End of Unit Revision
Total questions: 15
Worksheet time: 8mins
What symbol is used for addition in Python?
-
+
/
*
How do you compare two values for equality in Python?
Use the '===' operator to compare two values for equality.
Use the '==' operator to compare two values for equality.
Use the 'compare()' function to check for equality between two values.
Use the '=' operator to compare two values for equality.
What is a variable in Python?
A variable in Python is a type of function.
A variable in Python is a command used to execute code.
A variable in Python is a named location in memory used to store data.
A variable in Python is a fixed value that cannot change.
What function is used to display output in Python?
print()
output()
display()
show()
How do you take user input in Python?
Employ the 'scan()' function.
Utilize the 'get_input()' method.
Use the 'read()' function.
Use the 'input()' function.
What symbol is used to write a comment in Python?
#
%%
//
What is the purpose of commas in Python?
To define variables in Python.
To indicate the end of a statement.
To separate items
To create comments in the code.
What is the result of 5 + 3 * 2 in Python?
6
8
10
11
How do you check if a number is greater than another in Python?
Check if a number is equal to another using '==' operator.
Use the '>' operator, e.g., a > b.
Use the '<' operator, e.g., a < b.
Use the '!=' operator to compare two numbers.
What is the difference between an integer and a float in Python?
An integer is a number with a decimal point, while a float is a whole number.
An integer can have a decimal point, while a float cannot.
An integer is a whole number, while a float is a number with a decimal point.
Both integers and floats are the same in Python.
What will the following code print: print('Hello, World!')?
Hello World!
Hello, World?
Hello, World!
Hello, Universe!
What is the output of input('Enter your name: ') when the user types 'Alice'?
Alice
Alice Smith
Bob
Charlie
What will be the output?
name = "Dave"
print (name)
Dave
'Dave'
name
(name)
What would print (10 + 16) produce?
10
16
24
26
