Global and local variables
Quiz
•
Computers
•
10th - 12th Grade
•
Practice Problem
•
Medium
Louise Lockwood
Used 416+ times
FREE Resource
Enhance your content in a minute
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
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
13 questions
Networks - Introduction
Quiz
•
10th Grade
13 questions
Kuis Informatika
Quiz
•
10th Grade
15 questions
Chapter 8 by PD
Quiz
•
10th Grade
10 questions
Introducción tecnología
Quiz
•
7th - 11th Grade
10 questions
Desarrollo de Aplicaciones Web - Día 3
Quiz
•
10th Grade
11 questions
GCSE Computer Science Paper 2: Topic 2.1
Quiz
•
10th Grade
10 questions
Programacion Orientada a Objetos
Quiz
•
12th Grade - University
10 questions
BTEC DIT C3 LAA - Maintenance, Set up, Performance
Quiz
•
10th - 11th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
