codehs: Unit 2 Lessons 13 to 19

Quiz
•
Computers
•
9th - 12th Grade
•
Hard
Christine Marra
Used 128+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Program Development - Python: Conditionals

Quiz
•
9th - 10th Grade
15 questions
Selection in Python

Quiz
•
1st - 9th Grade
12 questions
Hour of Code

Quiz
•
6th - 12th Grade
10 questions
Python Vocab 1 Commands Quiz

Quiz
•
10th Grade - University
15 questions
KS4 - Python Turtle

Quiz
•
9th - 11th Grade
15 questions
Functions and Exceptions

Quiz
•
10th - 12th Grade
15 questions
Python with Tracy Trutle

Quiz
•
12th Grade
10 questions
Python Selection Statements

Quiz
•
11th 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
Appointment Passes Review

Quiz
•
6th - 8th 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
20 questions
Grammar Review

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

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade