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
13 questions
Robust Programming
Quiz
•
11th - 12th Grade
14 questions
LA7.C7: Turtle Graphics
Quiz
•
9th Grade - University
14 questions
IoT Chapter 2 Review
Quiz
•
9th - 12th Grade
14 questions
SNT Connaissance du Web
Quiz
•
10th - 12th Grade
10 questions
หน่วยที่ 2 หลักการสร้างแบรนด์ให้เป็นดิจิทัล
Quiz
•
12th Grade
10 questions
STM 1042- AKSES ELEKTRONIK
Quiz
•
7th Grade - University
10 questions
Computer Education Grade 3 Volume 4 Quiz
Quiz
•
3rd Grade - University
10 questions
Arduino
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
