codehs: Unit 2 Lessons 13 to 19

codehs: Unit 2 Lessons 13 to 19

9th - 12th Grade

15 Qs

quiz-placeholder

Similar activities

ICT as Social Change

ICT as Social Change

12th Grade

10 Qs

C# lesson10

C# lesson10

1st - 10th Grade

10 Qs

Excel - basic

Excel - basic

9th Grade

15 Qs

Excel

Excel

9th Grade

10 Qs

Cyber Security Homework 1

Cyber Security Homework 1

7th - 9th Grade

15 Qs

Arduino_Quiz

Arduino_Quiz

12th Grade

20 Qs

Kuis Dadakan ;)

Kuis Dadakan ;)

10th Grade - University

15 Qs

Паскаль. Основные команды

Паскаль. Основные команды

8th - 11th Grade

10 Qs

codehs: Unit 2 Lessons 13 to 19

codehs: Unit 2 Lessons 13 to 19

Assessment

Quiz

Computers

9th - 12th Grade

Practice Problem

Hard

Created by

Christine Marra

Used 128+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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?

  1. 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

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?