
SAFE - Python Workshop
Authored by bubu babu
Other
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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
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 Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Facts and fiction about Oulu
Quiz
•
9th Grade - University
12 questions
The Birthday Quiz
Quiz
•
4th Grade - Professio...
11 questions
Types of Mass Media
Quiz
•
10th Grade - Professi...
10 questions
Meet & Mingle emoji
Quiz
•
University
10 questions
Leaders of The World
Quiz
•
KG - University
11 questions
Principles of Economics(2)
Quiz
•
University
12 questions
possessive adjectives
Quiz
•
University
12 questions
About EU, Georgia
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Other
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University