
Python Demo
Quiz
•
Computers
•
9th Grade
•
Hard
Ujjwala Panchal
Used 2+ times
FREE Resource
Enhance your content in a minute
41 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the value of `y` after the code is executed?
```python
y = 10
for x in range(y):
if x == 5:
break
y = x
'''
5
10
0
1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which Python library is primarily used for data manipulation and analysis?
A) NumPy
B) Pygame
C) Pandas
D) Flask
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? ```python
nums = [1, 2, 3, 4]
print(nums[-1])
```
A) 1
B) 4
C) 3
D) Error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How many times does the loop run in the following code snippet? ```python
for i in range(2, 10, 3):
print(i)
```
A) 2
B) 3
C) 4
D) 5
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the following code output if the user inputs '7'? ```python
age = input("Enter your age: ")
if age >= 18:
print("Adult")
else:
print("Not Adult")
```
A) Adult
B) Not Adult
C) TypeError
D) ValueError
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used in Python to check if two variables are the same object?
A) ==
B) is
C) equals
D) ===
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with the following code snippet? ```python
score = 65
if score >= 60:
result = "Pass"
elif score < 60:
result = "Fail"
print(result)
```
A) The variable `result` is not defined in all code paths
B) There is no logical flaw; the code is correct
C) The `print(result)` statement should be indented
D) The `elif` statement is unnecessary
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
46 questions
BAI ON KHOI 5
Quiz
•
1st Grade - University
44 questions
OCR J275 - Networks Part A
Quiz
•
8th - 11th Grade
45 questions
L9_ÔN TẬP GIỮA KÌ 1
Quiz
•
9th Grade
39 questions
Dremel Safety Quiz
Quiz
•
9th - 12th Grade
36 questions
Nat 5 Computer Systems Revision
Quiz
•
9th - 10th Grade
36 questions
Excel tercel parcial licenciatura
Quiz
•
9th Grade - University
40 questions
TIK kelas 7, Penilaian Tengah semester
Quiz
•
7th Grade - University
38 questions
he
Quiz
•
8th - 10th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
6 questions
FOREST Self-Discipline
Lesson
•
1st - 5th Grade
7 questions
Veteran's Day
Interactive video
•
3rd Grade
20 questions
Weekly Prefix check #2
Quiz
•
4th - 7th Grade
