Search Header Logo

Intro to CS Quiz 2 - Python/Tracy the Turtle

Authored by JOHNSON JULIE

Computers

9th - 12th Grade

Used 3+ times

Intro to CS Quiz 2 - Python/Tracy the Turtle
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following is not a guideline for naming functions or variables?

Use descriptive names

Use numbers to start your name

Use lowercase letters

Use underscores for spaces

2.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

If I am creating a function that is going to draw 2 rectangles, which of the following would be the best name option?

draw_two_rectangles

Draw_two_rectangles

draw two rectangles

2_rectangles

3.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

The above code is from a program that draws four circles. Notice how the two loops are exactly the same. We should use a ___________ if we wanted to make a whole tower of these circles so we would not need to write the loop over and over every time we needed to use it.

variable

comment

function

speed command

4.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following statements is not true about functions?

Functions shorten our code

Functions make our code reusable by allowing us to repeat a set of commands any time we'd like

Functions break our code up into smaller parts which increases readability.

Functions do not need to be called. They are played in the order that the code is written.

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Before you use a function you must define it. Which function definition is correct to create circles?

def draw_circles()

def draw_circles():

draw_circles():

def draw_circles:

6.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Which of the following shows the correct way to indent your code when writing a function to draw a row of triangles?

Media Image
Media Image
Media Image
Media Image

7.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

Media Image

The above code draws four circles. Which of the following line(s) of code are calls to the function.

3

11,13

3,11,13

3, 4, 11,13

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?