
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
*Relation And Function*

Quiz
•
12th Grade
10 questions
Grade 3 Art of Thinking - Demonstration of Learning

Quiz
•
3rd Grade - University
10 questions
Python 2

Quiz
•
12th Grade
10 questions
Exploring Python Modules

Quiz
•
12th Grade
8 questions
Quiz de Python

Quiz
•
12th Grade
10 questions
Ça va? Choisissez la réponse la plus logique.

Quiz
•
9th - 12th Grade
7 questions
Projects

Quiz
•
12th Grade
8 questions
Verbe s'appeler

Quiz
•
1st - 12th Grade
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