
Python Scope

Quiz
•
Other
•
12th Grade
•
Hard
Amy Austin
Used 3+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable created inside a function in Python?
Local scope
Global scope
External scope
None of the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can a variable outside of a function be accessed within the function in Python?
By importing it
By passing it as an argument
By declaring it as external
By declaring it as global
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to modify a global variable inside a function?
modify
public
extern
global
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a Python data type?
Variable
Python
List
Function
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What method is used to add an item to a list in Python?
append()
add()
push()
insert()
6.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following is used to start a loop in Python?
for
loop
repeat
while
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to comment a single line in Python?
// This is a comment
# This is a comment
/* This is a comment */
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Que savez-vous du football ?

Quiz
•
9th - 12th Grade
10 questions
LES FRUITS

Quiz
•
1st - 12th Grade
15 questions
Tech Buzz R1

Quiz
•
12th Grade
10 questions
Lathe G Code Quiz Practice

Quiz
•
9th - 12th Grade
10 questions
Je réagis aux textes que je lis

Quiz
•
KG - Professional Dev...
11 questions
Français A1

Quiz
•
1st - 12th Grade
11 questions
Classroom Behavior

Quiz
•
5th - 12th Grade
8 questions
Size and Scope

Quiz
•
12th Grade - University
Popular Resources on Wayground
10 questions
Video Games

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

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
6 questions
Rule of Law

Quiz
•
6th - 12th Grade
15 questions
ACT Math Practice Test

Quiz
•
9th - 12th Grade
18 questions
Hispanic Heritage Month

Quiz
•
KG - 12th Grade
28 questions
Ser vs estar

Quiz
•
9th - 12th Grade
10 questions
Would you rather...

Quiz
•
KG - University
13 questions
BizInnovator Startup - Experience and Overview

Quiz
•
9th - 12th Grade