

Python quiz
Presentation
•
Engineering
•
University
•
Practice Problem
•
Hard
JAGARLAMUDI 23BCE9726
Used 3+ times
FREE Resource
0 Slides • 15 Questions
1
Multiple Choice
What is the correct syntax to print a string in Python?
echo "Hello, World!"
print("Hello, World!")
printf("Hello, World!")
System.out.println("Hello, World!")
2
Multiple Choice
How do you create a list in Python?
{1, 2, 3}
(1, 2, 3)
[1, 2, 3]
list(1, 2, 3)
3
Multiple Choice
Which library is used for data manipulation and analysis in Python?
NumPy
Pandas
Matplotlib
SciPy
4
Multiple Choice
How do you create a tuple in Python?
[1, 2, 3]
{1, 2, 3}
(1, 2, 3)
tuple[1, 2, 3]
5
Multiple Choice
Which of the following is NOT a valid Python data type?
int
float
double
str
6
Multiple Choice
How do you install an external Python library?
install library_name
python -m pip install library_name
include library_name
library_name install
7
Multiple Choice
What is the output of print(type([]))?
<class 'list'>
<type 'list'>
list
[]
8
Multiple Choice
How do you start a for loop in Python?
for (i=0; i<10; i++)
for i in range(10):
for i = 1 to 10:
foreach (i in 10)
9
Multiple Choice
What is the output of print(10 // 3)?
3.33
3
4
None
10
Multiple Choice
What is the correct way to write a conditional statement in Python?
if x > y {}
if x > y:
if x > y then:
if (x > y):
11
Multiple Choice
What will be the output of the following code snippet?
def foo(x=[]):
x.append(1)
return x
print(foo())
print(foo())
[1] [1]
[1] [2]
[1] [1, 1]
[1] [1, 2]
12
Multiple Choice
Which of the following statements about Python's Global Interpreter Lock (GIL) is TRUE?
It allows multi-threading in Python to run concurrently on multiple cores.
It prevents multiple threads from executing Python bytecodes at the same time.
It is specific to Jython and not CPython.
It is used to manage memory allocation across threads.
13
Multiple Choice
What will the following code output?
class A:
def init(self):
self.value = 10
def getattr(self, name):
if name == 'value':
return 20
raise AttributeError
a = A()
print(a.value)
10
20
AttributeError
Depends on Python version
14
Multiple Choice
What is the time complexity of list.pop(0) in Python?
O(1)
O(log n)
O(n)
O(n^2)
15
Multiple Choice
What is the difference between is and == in Python?
is checks value equality, and == checks reference equality.
Both check reference equality.
Both check value equality.
is checks reference equality, and == checks value equality.
What is the correct syntax to print a string in Python?
echo "Hello, World!"
print("Hello, World!")
printf("Hello, World!")
System.out.println("Hello, World!")
Show answer
Auto Play
Slide 1 / 15
MULTIPLE CHOICE
Similar Resources on Wayground
9 questions
garis dan sudut
Presentation
•
University
11 questions
Algebra - Lesson Negative Exponents
Presentation
•
12th Grade
10 questions
Desarrollo del Niño y del Adolescente, Judith Meece
Presentation
•
University
11 questions
Teenager 5 Session 24: Pronunciation & Speaking
Presentation
•
KG
12 questions
E-mail Writing
Presentation
•
University
12 questions
pembacaan jangka sorong 0,05 mm
Presentation
•
KG - University
12 questions
Procedure text
Presentation
•
12th Grade - University
10 questions
Cation/Anion
Presentation
•
12th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations
Quiz
•
6th - 8th Grade
10 questions
HCS SCI 03 Summer School Assessment 2
Quiz
•
3rd Grade
11 questions
Home Scope
Quiz
•
7th - 8th Grade
12 questions
2026 TAP Technology in the Classroom
Presentation
•
Professional Development
15 questions
HCS SCI 05 Summer School Assessment 2 Review
Quiz
•
5th Grade
15 questions
HCS SCI 04 Summer School Review 2
Quiz
•
4th Grade
59 questions
Geometry Unit 3 Review
Quiz
•
9th - 12th Grade
14 questions
FAST ELA READING SMAPLE TEST MATERIALS
Passage
•
3rd Grade