Search Header Logo

CS Programming Unit 2 Review

Authored by Zachary Wilson

Business

9th Grade

DOK Level 1: Recall covered

Used 2+ times

CS Programming Unit 2 Review
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

19 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a function in Python?

A block of code that only runs when it is called

A variable that stores data

A type of loop

A method to handle exceptions

Tags

DOK Level 1: Recall

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct indentation for the body of a function in Python?

2 spaces

4 spaces

6 spaces

8 spaces

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the 'pass' statement in Python functions?

To end a function

To do nothing for that function

To print a message

To start a loop

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Can we define a function without any parameters? For example:

def drawStar():

Yes

No

Maybe

I don't know

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the function of the onMousePress(mouseX, mouseY) event?

It is called when a key is pressed

It is called when the mouse is moved

It is called every time the canvas is clicked

It is called when the program starts

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is one of the best ways to help understand and debug your code?

print

input

return

break

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What key can be used to access the inspector in debugging?

Alt

Shift

Control or Ctrl

Tab

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?