
Python Fundamentals: Variables and Printing
Quiz
•
Computers
•
4th Grade
•
Medium

Surrey Clayton Teacher Best Brains
Used 9+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a variable in Python?
A type of Python snake
A container for storing data values
A print command
A mathematical constant
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct variable assignment in Python?
variable = 'Hello, World!'
2variable = 'Hello, World!'
variable-name = 'Hello, World!'
$variable = 'Hello, World!'
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print? ```python print("Hello\nWorld") ```
Hello World
HelloWorld
Hello\nWorld
Hello World
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `\n` symbol represent in Python?
A new tab
A new line
A space
A backslash
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python x = 10 print(x) ```
x
10
'x'
'10'
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a valid variable name in Python?
my_variable
myVariable
1stVariable
variable1
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? ```python a = 5 b = 10 print(a + b) ```
5 + 10
15
a + b
510
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
12 questions
Lesson 9 - The internet
Quiz
•
8th Grade
10 questions
Python for Beginner - Module 1
Quiz
•
7th Grade
15 questions
Python Fundamentals Quiz
Quiz
•
11th Grade
14 questions
Python Input, Print, and Expressions
Quiz
•
7th Grade
14 questions
Python-basics
Quiz
•
1st - 4th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
13 questions
Python Recap Challenge
Quiz
•
10th Grade
12 questions
Python Programming Basics
Quiz
•
7th - 11th Grade
Popular Resources on Wayground
20 questions
Brand Labels
Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
20 questions
ELA Advisory Review
Quiz
•
7th Grade
15 questions
Subtracting Integers
Quiz
•
7th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns
Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials
Interactive video
•
6th - 10th Grade