
Python Programming Concepts Quiz

Quiz
•
Information Technology (IT)
•
University
•
Medium
Abhishek Swami
Used 2+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? def greet(): print("Hello") greet() greet()
Hello
HelloHello
Hello Hello
Error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an advantage of modular programming?
Slower execution
Easier debugging
Harder to maintain
Code repetition
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is a module in Python?
A comment
A variable
A file containing Python code
A type of loop
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the scope of a variable declared inside a function?
Global
Class
Local
Module
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to declare a global variable inside a function?
local
global
scope
def
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output? x = 5 def update(): x = 10 update() print(x)
10
5
Error
None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What happens if you try to modify a global variable inside a function without declaring it as global?
It modifies the global variable
It throws an error
It creates a new local variable
The function won't execute
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
Understanding Java Classes and Inheritance - UNIT 1

Quiz
•
University
23 questions
Python Quiz

Quiz
•
University
15 questions
UML and System Modeling Quiz

Quiz
•
12th Grade - University
20 questions
Функції у Python. Частина 2

Quiz
•
University
22 questions
CUESTIONARIO UNIDAD 3

Quiz
•
University
20 questions
KUIZ DIAGNOSTIK

Quiz
•
11th Grade - University
15 questions
ITP1 Week 14 Recap

Quiz
•
University
15 questions
oop intro class & object

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

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

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University