
CodeHS Unit 3 Test
Authored by Anthony Sinapi
Computers
10th - 12th Grade
Used 28+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
About
This quiz comprehensively covers Python programming fundamentals, specifically focusing on data types, variables, operators, and basic input/output operations. The content is designed for high school students in grades 10-12 who are learning introductory computer programming concepts. Students need to understand Python's core data types (strings, integers, floats), operator precedence in mathematical expressions, type conversion functions, variable naming conventions, and proper syntax for print statements and user input. The questions require students to trace through code execution, predict program output, identify syntax errors, and demonstrate knowledge of Python-specific features like the exponentiation operator (**) and comment syntax (#). Students must also grasp the distinction between binary and unary operators, understand how Python handles string concatenation and multiplication, and recognize when type mismatches will cause runtime errors. Created by Anthony Sinapi, a Computers teacher in Canada who teaches grades 10-12. This assessment serves as an excellent unit test for students completing their third unit of Python programming study, providing comprehensive evaluation of foundational programming concepts. Teachers can use this quiz as a summative assessment to gauge student mastery of essential Python syntax and concepts, or adapt portions for formative assessment during instruction. The varied question formats make it suitable for review sessions, homework assignments, or warm-up activities when broken into smaller sections. The quiz aligns with computer science education standards that emphasize algorithmic thinking, programming fundamentals, and computational problem-solving skills, supporting curriculum objectives for introductory programming courses at the secondary level.
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the final result of the expression 4 + 5 * 3?
27
12
21
19
2.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What is the final result of the expression 7 / 2 + 6?
0
9
9.5
0.875
3.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Choose the print statement below that will cause an error. Assume that num has the value 6, and name has the value Isabella.
print(name + ":" )
print(num)
print(name + " wants " + "num " + "candies")
print(name + ": " + str(num))
print(name + ": " + num)
4.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Which one of the statements below will cause an error?
ans = “hi” * 8
ans = “hi” + 9
ans = “hi” + “hi” + “hi”
ans = (“a” * 4) + “b”
5.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
What does the following program print?
a = "hi"
b = 4
c = a * b
print(type(c))
<type 'str'>
<type 'int'>
<type 'float'>
The program crashes and doesn’t print anything.
6.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Suppose you have a variable defined a = "4". What is the variable type of a?
str
int
float
number
7.
MULTIPLE CHOICE QUESTION
5 mins • 1 pt
Choose the option that correctly prints out the variable(s).
x = "codehs"
print(int(x))
num = 8
print("num")
name = "Alyx"
age = 32
print(name + "is " + age)
language = "Python"
print("I'm learning " + language)
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?