
Python Variables and Naming Conventions Quiz
Authored by Adham Elmuntser
Computers
1st Grade
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a local variable in Python?
Entire program
Inside a function
Inside a module
Across multiple functions
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you declare a global variable inside a function?
global variable
global: variable
global.variable
global variable=
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which naming convention is typically used for constants in Python?
camelCase
PascalCase
UPPER_CASE
snake_case
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the primary use of local variables?
Sharing data across functions
Storing temporary data
Configuring the program
Accessing system resources
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to modify a global variable inside a function?
external
public
global
mutable
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which naming convention is generally used for class names in Python?
camelCase
PascalCase
snake_case
UPPER_CASE
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is it recommended to use meaningful names for variables?
To save memory
To improve code readability
To increase execution speed
To avoid errors
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 Microsoft
or continue with
%20(1).png)
Apple
Others
Already have an account?