codehs: Unit 2 Lessons 13 to 19
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Christine Marra
Used 128+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Why are parameters useful?
They allow us to tailor functions to be used in multiple situations
They allow us to change the order of commands in a function
They give us the ability to use variables in loops
They allow the user to give input
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
How many parameters can we use in each function?
1
2
4
As many as we need
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is the best way to write a program that uses parameters to draw a square with sides that are 50 pixels long?
def make_square(length):
for i in range(4):
forward(length)
left(90)
make_square(50)
def make_square(length):
for i in range(4):
forward(50)
left(90)
make_square(50)
def make_square(50):
for i in range(4):
forward(50)
left(90)
make_square(50)
def make_square(length):
for i in range(4):
forward(length)
left(90)
make_square(length)
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What is the default starting value of i in a for loop?
0
1
2
10
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will the values of i be at each iteration of the loop below?
- for i in range(3):
1, 2, 3
0, 1, 2, 3
0, 1, 2
2, 3
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
What will happen when the value of i reaches 5 in the loop below?
for i in range(5):
left(i)
right(90)
Tracy will turn 5 degrees to the right
Tracy will turn 5 degrees to the left
Tracy will turn 90 degrees to the right
Tracy will turn 90 degrees to the left
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
Why do we use if statements?
To tell Tracy to stop our code if there’s an error
To have Tracy make decisions based on conditional statements
To tell Tracy to do something if we run our code
To have Tracy complete one function at a time
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
14 questions
4th quarter 2nd summative
Quiz
•
10th Grade
17 questions
Security and Ethics
Quiz
•
9th - 12th Grade
15 questions
Coding Quiz
Quiz
•
6th - 10th Grade
15 questions
Virtual Private Server
Quiz
•
12th Grade
17 questions
Mobile app development principles
Quiz
•
10th Grade
12 questions
Q2 WEEK 3 PRACTICE QUIZ #2
Quiz
•
9th Grade
10 questions
Recap: Introduction to Python
Quiz
•
10th Grade
14 questions
Intro to Robotics
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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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
