Unit 2 Test (Functions Python Review)

Quiz
•
Computers
•
8th - 12th Grade
•
Medium
Antonio Leon
Used 28+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
5 mins • 8 pts
llama
llama
llama
llama llama llama
llama, llama, llama
No output due to an error
Answer explanation
Commas add a space and one print statement will print sideways on the same line.
2.
MULTIPLE CHOICE QUESTION
5 mins • 5 pts
120
120.0
15
No output due to an error
Answer explanation
When the function is called, the inputs are 4, 5, and 6. The function tells us to multiply them together. Which yields 120. No decimal point since no single slash division was taking place.
3.
MULTIPLE CHOICE QUESTION
5 mins • 5 pts
1.667
2.0
1
No output due to an error
Answer explanation
When function is called, be careful of the order of the inputs. DeltaX and then Delta Y so the inputs are 6 and 10.0 respectively. And then we divide Deltay by DeltaX. Which yields 1.667.
4.
MULTIPLE CHOICE QUESTION
5 mins • 5 pts
25.0
25
10
10.0
No output due to an error
Answer explanation
This function takes in an input and returns that input times itself (squared). The input is 5 when called, so the returned answer is 25.
5.
MULTIPLE CHOICE QUESTION
5 mins • 5 pts
x is
1
and y is
2
x is, 1, and y is, 2
x is 1 and y is 2
x is1and y is2
No ouptut due to an error
Answer explanation
Commas add a space when connecting pieces of the print statement. One print statement prints sideways on one line.
6.
MULTIPLE CHOICE QUESTION
5 mins • 5 pts
17.0
17
42.0
42
No output due to an error
Answer explanation
Remember order of operations. a/b yields 5.0. And c*d yields 12. 5.0+12 in the end is 17.0. The single slash division gives you a decimal, and it stays with the problem until the end.
7.
MULTIPLE CHOICE QUESTION
5 mins • 5 pts
27.65
-27.65
0.49
.65
No output due to an error.
Answer explanation
The function is called, but the no inputs are within the parentheses. Despite us knowing what is going on, python does not and doesn't relate outside variables to the function unless typed in as inputs. getChange(price, paid) would give us our intended answer.
Create a free account and access millions of resources
Similar Resources on Quizizz
13 questions
Entry Level - Programming Techniques

Quiz
•
8th - 9th Grade
10 questions
Year 8 - Progress Check 1 (Python Turtle Shapes)

Quiz
•
8th - 9th Grade
10 questions
Programming in Java

Quiz
•
8th Grade
10 questions
Python Basics

Quiz
•
12th Grade - University
12 questions
Python

Quiz
•
7th - 8th Grade
10 questions
Pseudocode WHILE Loops

Quiz
•
10th - 12th Grade
10 questions
C#

Quiz
•
11th Grade
13 questions
Program Development - Python: Errors

Quiz
•
8th - 10th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Computers
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
10 questions
Right Triangles: Pythagorean Theorem and Trig

Quiz
•
11th Grade