
Unit 2 Test (Functions Python Review)
Authored by Antonio Leon
Computers
8th - 12th Grade
Used 28+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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.
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?
Similar Resources on Wayground
10 questions
Google Apps
Quiz
•
10th Grade - Professi...
11 questions
Identifying devices
Quiz
•
12th Grade
10 questions
Recuperação PC - 8º Ano - Projeto Pega Pega Digital
Quiz
•
8th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
10 questions
INTRODUCCION A LA PROGRAMACION
Quiz
•
6th Grade - University
10 questions
Binary Subtraction
Quiz
•
12th Grade
15 questions
1.1.1 The structure and function of the processor
Quiz
•
11th Grade - University
10 questions
Fundamentos PHP (Manejo de Fomularios y arreglos)
Quiz
•
9th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade