
Lesson 7 Python

Quiz
•
Other
•
10th Grade
•
Hard
Ramadhan Ramadhan
Used 1+ times
FREE Resource
27 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code: print(list(range(5)))?
[0, 1, 2, 3, 4, 5]
[0, 1, 2, 3, 4]
[0, 1, 2, 3]
[1, 2, 3, 4, 5]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you define a function in Python?
function_name: parameters =>
create function_name(parameters)
function_name(parameters) =>
def function_name(parameters):
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What keyword is used to create a loop in Python?
for, while
iterate
repeat
looping
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code: if 5 > 3: print('True') else: print('False')?
Maybe
True
False
I don't know
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you take user input in Python?
Use the 'read()' function to take user input.
Use the 'scan()' function to take user input.
Use the 'input()' function to take user input.
Use the 'get()' function to take user input.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the 'break' statement in a loop?
To pause the loop for a specified time.
To skip the current iteration and exit the loop.
To exit a loop prematurely.
To continue to the next iteration of the loop.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you call a function named 'my_function'?
invoke my_function()
call my_function()
execute my_function
my_function()
Create a free account and access millions of resources
Similar Resources on Wayground
25 questions
ОЛИМПИАДА ПО ИНФОРМАТИКИ

Quiz
•
10th - 11th Grade
25 questions
PEMROGRAMAN DASAR

Quiz
•
10th Grade
25 questions
CodeHS Programming Review

Quiz
•
9th - 12th Grade
30 questions
Telecomunicaciones

Quiz
•
9th - 11th Grade
24 questions
Quiz on Atomic Habits

Quiz
•
9th - 12th Grade
25 questions
A Revamped STEAM-y Quiz

Quiz
•
9th - 12th Grade
25 questions
Arduino BOE Bot MS

Quiz
•
9th - 12th Grade
24 questions
PDM EOC

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade