Search Header Logo

CMU CS Academy Unit 7.2 Local Variables

Authored by Joan Goldberg

Computers

9th Grade

Used 16+ times

CMU CS Academy Unit 7.2 Local Variables
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

7 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about global variables?

Globals should never be used.

Globals should be used as little as possible.

Python will not run code that includes globals.

Globals should be used as much as possible.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is true about function parameters?

Function parameters should never be used.

Function parameters are locals not globals.

Function parameters are globals not locals.

Function parameters should be used as little as possible.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which variables are global?

color

mouseX, mouseY

mouseX, mouseY, color

counter

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which variables are local?

color

mouseX, mouseY

mouseX, mouseY, color

counter

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which variables are function parameters?

color

mouseX, mouseY

mouseX, mouseY, color

counter

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Which variables are helper variables?

color

mouseX, mouseY

mouseX, mouseY, color

counter

7.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Media Image

Select the true statements.

s is a local variable

s is a global variable

s is a helper variable

s is.a function parameter

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?