
SAFE - Python Workshop

Quiz
•
Other
•
University
•
Medium

bubu babu
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Which of the following is not non-primitive data type?
List
Tuple
Dictionary
String
2.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What is the output of the following code snippet?
x = 5
y = 10
if x < y:
print("x is less than y")
elif x == y:
print("x is equal to y")
else:
print("x is greater than y")
x is less than y
x is equal to y
x is greater than y
Error: Invalid syntax
3.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
How many times will the following for loop iterate?
for i in range(3, 6):
print(i)
2
5
4
3
4.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What does the "break" statement do in a loop?
Terminates the loop and transfers control to the next iteration
Continues to the next iteration of the loop
Exits the entire program
None of the above
5.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
Which of the following is the correct syntax to define a function in Python?
def my_function():
function my_function():
define my_function():
function def my_function():
6.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What will be the output of the following function call?
def square(x):
return x * x
result = square(3) + square(4)
print(result)
12
21
49
25
7.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What is the output of the following code snippet?
x = 10
while x > 0:
print(x)
x -= 2
10 8 6 4 2
10 9 8 7 6 5 4 3 2 1
10 7 4 1
Infinite loop
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python Quizz 3

Quiz
•
University
14 questions
Intro to Python Programming Quiz 9D

Quiz
•
1st Grade - University
15 questions
Kuiz Microsoft Power Point

Quiz
•
KG - University
10 questions
python set 1

Quiz
•
University
15 questions
Theory of Computation-Finite Automata

Quiz
•
University
10 questions
Introduction to MS Excel - Quiz

Quiz
•
University
10 questions
Introduction to Management

Quiz
•
University - Professi...
10 questions
Cloud Computing

Quiz
•
University
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
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University