Search Header Logo
CMU Unit 2.2.4  and 7.2 Variables

CMU Unit 2.2.4 and 7.2 Variables

Assessment

Flashcard

Computers

9th Grade

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

14 questions

Show all answers

1.

FLASHCARD QUESTION

Front

A variable declared within a subroutine or function

Back

Local

2.

FLASHCARD QUESTION

Front

A variable declared in the main program

Back

Global

3.

FLASHCARD QUESTION

Front

The correct way to write a variable in Python? Options: myVariable = 10, my Variable = 10, myVariable is 10, myVariable: 10

Back

myVariable = 10

4.

FLASHCARD QUESTION

Front

Which of the following is an advantage of using local variables? They allow the variable to be used throughout the whole program, They allow variable identifiers to be reused each time, They are easier to program than global variables, A wider range of data types can be used

Back

They allow variable identifiers to be reused each time

5.

FLASHCARD QUESTION

Front

What term is used to describe data passed into/out of a program?

Back

Parameter

6.

FLASHCARD QUESTION

Front

Leo wants to create a subroutine / function that will roll a dice. Which syntax is correct? Options: def dice roll ():, def diceroll (), def diceroll ():, def diceroll []:

Back

def diceroll ():

7.

FLASHCARD QUESTION

Front

Which of the following is an advantage of using global variables? They allow the variable to be used throughout the whole program, They allow variable identifiers to be reused each time, They are easier to program than global variables, A wider range of data types can be used

Back

They allow the variable to be used throughout the whole program

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?