
Global and local variables
Authored by Louise Lockwood
Computers
10th - 12th Grade
Used 441+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A variable declared within a subroutine
Global
Local
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A variable declared in the main program
Global
Local
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The correct way to write a variable in Python?
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What term is used to describe data passed into/out of a program?
Variable
Loop
Constant
Parameter
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Leo wants to create a subroutine that will roll a dice. Which syntax is correct?
def dice roll ():
def diceroll ()
def diceroll ():
def diceroll []:
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Which is the correct output for this program?
bacon local ,spam local, bacon local, global
spam local, bacon local, bacon local, global
global, bacon local, spam local, bacon local,
global, spam local, bacon local, bacon local
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Visual C# Quiz - Chapter 5: Loops, Files, and Random Numbers
Quiz
•
12th Grade
10 questions
Attacchi informatici
Quiz
•
9th - 12th Grade
10 questions
Asesmen Formatif
Quiz
•
11th Grade
15 questions
QUIZ DE REPASO PROGRAMACION
Quiz
•
11th Grade
10 questions
QBASIC Programming
Quiz
•
5th - 10th Grade
10 questions
EMPTECH L4 Q3
Quiz
•
12th Grade
12 questions
ULANGAN HARIAN Semester 2
Quiz
•
10th Grade
12 questions
web temeller - 01
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade