Python Variables and Scope
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Hard
Amy Austin
Used 2+ times
FREE Resource
Enhance your content in a minute
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What are variables that are created outside of a function known as?
Local variables
External variables
Global variables
Internal variables
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Where can global variables be used?
Only inside functions
Only outside functions
Both inside and outside of functions
Nowhere
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If a variable with the same name is created inside a function, what is the scope of this variable?
Global
Local
External
Universal
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens to the global variable when a local variable with the same name is used inside a function?
The global variable is overwritten
The global variable is deleted
The global variable remains unchanged
The global variable becomes local
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used in Python to refer to a global variable inside a function if you want to change its value?
local
var
global
nonlocal
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the print statement in the provided Python code example?
Python is awesome
Python is fantastic
Python is x
Python is
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a type of certificate offered by the website shown in the image?
HTML Certificate
CSS Certificate
C Certificate
JavaScript Certificate
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
10 questions
Computer Languages
Quiz
•
6th - 12th Grade
10 questions
python quiz
Quiz
•
6th Grade - Professio...
10 questions
Scratch
Quiz
•
KG - Professional Dev...
12 questions
тест Python 7 class
Quiz
•
1st - 12th Grade
10 questions
Cultura Digital 1 Pseudocódigo
Quiz
•
12th Grade
10 questions
Java Fundamentals
Quiz
•
12th Grade
10 questions
CSP-Selection and Iteration
Quiz
•
9th - 12th Grade
13 questions
BTEC Level 2 Networking and Cybersecurity Revision
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
