Search Header Logo

Intro to CS Semester Test Review P1

Authored by Kay Carpenter

Computers

9th Grade

Used 13+ times

Intro to CS Semester Test Review P1
AI

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

Media Image

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

Media Image

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

Media Image

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

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?