CMU Unit 2.2.4  and 7.2 Variables

CMU Unit 2.2.4 and 7.2 Variables

Assessment

Flashcard

Computers

9th Grade

Hard

Created by

Quizizz 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

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?