
Python Basics Quiz
Authored by Victor Chan
Computers
8th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
30 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
True or False: Indentation in Python is for readability only.
TRUE
FALSE
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a correct way to declare a Python variable?
var x = 5
#x = 5
$x = 5
x = 5
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which is NOT a legal variable name?
my-var = 20
my_var = 20
Myvar = 20
_myvar = 20
4.
FILL IN THE BLANKS QUESTION
30 sec • 1 pt
Create a variable named carname and assign the value Volvo to it.
carname = (a)
5.
FILL IN THE BLANKS QUESTION
30 sec • 1 pt
Create a variable named x and assign the value 50 to it.
x =
(a)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a correct syntax to add the value 'Hello World', to 3 variables in one statement?
x, y, z = 'Hello World'
x = y = z = 'Hello World'
x|y|z = 'Hello World'
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code:
fruits = ['apple', 'banana', 'cherry']
a, b, c = fruits
print(a)
What will be the result of a?
apple
banana
cherry
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?