Python Variables and Scope

Quiz
•
Computers
•
12th Grade
•
Hard
Amy Austin
Used 1+ times
FREE Resource
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
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What type of examples does the website provide as part of its learning material?
HTML Examples
Cooking Recipes
Travel Guides
Fashion Tips
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not listed as a reference material on the website?
Python Reference
W3.CSS Reference
Bootstrap Reference
Cooking Reference
Similar Resources on Wayground
10 questions
Python Variables

Quiz
•
7th - 12th Grade
10 questions
7. PYTHON FUNCTIONS -2

Quiz
•
12th Grade
10 questions
Code.org Unit 5 Vocab Quiz 1

Quiz
•
9th - 12th Grade
10 questions
Pensée computationnelle 2

Quiz
•
12th Grade
10 questions
Python Programming Concepts Challenge

Quiz
•
10th Grade - University
10 questions
2.2.1 Variables and Functions

Quiz
•
12th Grade
10 questions
l.7. PYTHON FUNCTIONS

Quiz
•
12th Grade
10 questions
Understanding Procedures in Python

Quiz
•
9th Grade - University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade