
Python Variables Quiz
Authored by Shushankita Vinod Mishra
Computers
5th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a variable in Python?
A type of loop
A container that holds data
A special function in Python
A built-in keyword
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid variable name?
1name
my-score
_age
my score
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? Age = 30 age = 25 print(Age, age)
30 25
25 30
Error: Variables cannot have different cases
None of the above
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid rule for naming variables in Python?
Variable names must start with a letter or an underscore
Variable names can contain spaces
Variable names are case-sensitive
Variable names should not use Python keywords
5.
OPEN ENDED QUESTION
3 mins • 1 pt
What will be the output of the following code? name = "Alice" age = 18 print(type(name)) print(type(age))
Evaluate responses using AI:
OFF
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is the following variable declaration invalid? def = "Hello"
Variable names cannot contain strings
def is a Python keyword
def must start with an underscore
Python does not allow assigning strings to variables
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a meaningful variable name?
x
var1
student_score
abc
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 Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Ôn tập kỳ 2 tin 6
Quiz
•
1st - 12th Grade
10 questions
Python
Quiz
•
3rd - 10th Grade
10 questions
El buen uso de la Computadora
Quiz
•
3rd - 6th Grade
10 questions
Funciones en Excel
Quiz
•
5th Grade
11 questions
What is a computer
Quiz
•
KG - University
10 questions
Internet services-Venesha
Quiz
•
3rd - 6th Grade
10 questions
Working with tables
Quiz
•
5th - 12th Grade
10 questions
Электронные таблицы. Основные понятия.
Quiz
•
5th - 11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade