Python Variables Quiz
1. Which of these is a valid variable name?
2name
_name
for
None of these
2. What will this print?
x = 5; x = "Hello"; print(x)
5
Hello
Error
None
3. Multiple assignment:
x, y = 1, 2
. What is y?
1
2
Error
None
4. What is dynamic typing?
Variable type cannot change
Variable type can change at runtime
Variables are constants
Variables are optional
5. Which of these is NOT a Python data type?
int
str
float
char
Submit Quiz
← Back to Lesson