
CodeHS Python Chapter 2
Authored by Greg Baker
Computers
10th - 12th Grade
Used 39+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Suppose you write a function. How many times can you call the function in your code?
Once
Not more than the number of commands the function holds
It depends on the function
As many times as you want
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In which of the following situations would it be best to make a function?
You want Tracy to draw a blue line, and your program requires lots of blue lines.
You need Tracy to move forward by 100.
You need Tracy to turn right and then turn left.
You need to change Tracy’s color.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the statements below is true about indentation in Python?
Indentation only matters in for loops. Then, everything must be indented one level.
Indentation never matters in Python. You can align your code any way you like, but indentation makes your code easier to read.
Indentation always matters in Python. Every statement must be aligned correctly.
Indentation only matters in functions. Then, everything must be indented one level.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is NOT a purpose of using functions?
Functions let Tracy do new things.
Functions help group statements together to make your code more readable.
Functions let you execute code a fixed number of times.
Functions allow the programmer to reuse code.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between defining and calling a function?
Defining a function means you are teaching the computer a new word. Calling a function means you are commanding the computer to complete defined actions.
There is no difference.
Calling a function means you are teaching the computer a new word. Defining a function means you are commanding the computer to complete defined actions.
Defining a function must be done each time you want to use the function. Calling a function can only happen once in your code.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following commands can be used to turn Tracy to face North if she is initially facing South?
left(90)
right(180)
left(180)
left(360)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What shape will be drawn with the following command?
circle(50, 360, 3)
(careful)
A circle
A hexagon
A triangle
A diamond
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
20 questions
NP IT Quiz ปริศนาไอที #4
Quiz
•
9th - 12th Grade
20 questions
Pretest TIK
Quiz
•
10th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
18 questions
12AIT - All About W3C <3
Quiz
•
10th Grade - University
18 questions
EXA-DIAG-INF-III-AGO-2022
Quiz
•
11th Grade
20 questions
Advantages and Disadvantages of Collecting Data
Quiz
•
10th Grade
19 questions
¿Qué es un sistema operativo?
Quiz
•
10th Grade
16 questions
AI Checkpoint 1 Revision
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade