Python variables, expressions, and data types

Quiz
•
Computers
•
9th - 12th Grade
•
Easy
Brett Kottmann
Used 15+ times
FREE Resource
20 questions
Show all answers
1.
MATCH QUESTION
20 sec • 5 pts
Match the following values with their Python data types
int (integer)
4
bool (boolean)
7.3
str (string)
"Hello"
float (decimal)
True
2.
DRAG AND DROP QUESTION
20 sec • 5 pts
Order the below into the correct order for an assignment statement in Python. Not all options are used.
(a) (b) (c)
3.
MULTIPLE SELECT QUESTION
20 sec • 5 pts
What are the two (2) preferred (as opposed to valid) naming styles for variables in Python?
Camel case
Traditional
Formal
Proper
Answer explanation
Camel case (thisIsCamelCase) and traditional (this_is_traditional) are the two preferred ways to name variables.
Python, as a language, accepts all names that:
start with a letter (no numbers!) or underscore
do not contain any special characters except for underscores (_)
do not contain a space
4.
MATH RESPONSE QUESTION
20 sec • 5 pts
What is the result of the following Python print statement?
print(4 + 2 * 3 - 6)
Mathematical Equivalence
ON
Answer explanation
Follow PEMDAS: parenthesis, exponents, multiplication and division, addition and subtraction.
Do 2 * 3 first (6) then addition and subtraction from left to right:
4 + 6 = 10
10 - 6 = 4
5.
MULTIPLE SELECT QUESTION
30 sec • 5 pts
Which of the following are valid Python variable names?
4square
route66
home_address
studentAge
ver1.3
Answer explanation
6.
MULTIPLE CHOICE QUESTION
30 sec • 5 pts
What will this code output?
print("confusion")
Confusion
confusion
Syntax Error
7.
MULTIPLE CHOICE QUESTION
20 sec • 5 pts
In the following code, what is happening?
foo = "bar"
A variable named foo is being created, with a value of "bar"
A variable named bar is being created, with a value of "foo"
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Unit 3 Python TEST

Quiz
•
11th - 12th Grade
20 questions
Procedures and Functions

Quiz
•
10th Grade
15 questions
Python Casting and Input

Quiz
•
8th - 11th Grade
20 questions
UH1_INFO_XII

Quiz
•
11th Grade
23 questions
GCSE Python Programming Basics

Quiz
•
11th Grade
20 questions
Principles of Computer Science

Quiz
•
10th - 12th Grade
20 questions
Python Quiz 2

Quiz
•
9th Grade
20 questions
Y9 - T2 - L6 - HOMEWORK

Quiz
•
9th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
30 questions
Introduction to Computers

Quiz
•
8th - 9th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade