
Intro to CS Semester Test Review P1
Authored by Kay Carpenter
Computers
9th Grade
Used 13+ 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
2 mins • 1 pt
Refer to the following code. This type of comment in Python is known as a(n):
"""
This function moves Tracy from the center
of the canvas to the beginning of the hurdle.
"""
in-line comment
two-line comment
multi-line comment
triple-quote comment
2.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following statements regarding comments is INCORRECT?
Comments can be used to help anyone viewing the code to keep track of coding steps and decisions
Comments can be used to give the computer prioritized instructions or change the order of code
Comments can be used to describe each part of the code so it can be altered easily
Comments are not read by the program and have no impact on how the code runs
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the following program print when run?
babble
crackle
pop
crackle
pop
fizz
fizz
pop
fizzle
crackle
pop
fizzle
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What gets printed to the console from this code?
Alpha
Omega
Gamma
Nothing prints to the console
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
How many circles will Tracy draw when the following program is run?
5 circles
10 circles
15 circles
25 circles
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which of the following print statements correctly combines two string variables venue and direction and the integer variable distance using string concatenation?
The printed result should look like, “The stadium is 4 blocks north”
print(“The “ + venue + “ is “ + int(str(distance)) + “ blocks “ + direction)
print(“The “ + venue + “ is “ + str(distance) + “ blocks “ + direction)
print(“The + venue + is “ + str(distance) + “ blocks + direction”)
print(“The “ + venue + “ is “ + readInt(str(distance)) + “ blocks “ + direction)
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Which type of loop would you use to continually ask the user to guess a number, until their input matched the value of the variable lucky_num?
For
While
If/Else
If
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?