
Understanding Input, Selection and Loops in Python
Quiz
•
Computers
•
7th Grade
•
Practice Problem
•
Medium
Toby Adams
Used 5+ times
FREE Resource
Enhance your content in a minute
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the input() function do in Python?
It prints text to the screen.
It receives input from the user.
It saves data to a file.
It creates a loop.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of output in Python?
input("Enter your name: ")
print("Hello, world!")
len("cat")
int("5")
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes a loop in Python?
A way to store data
A way to repeat a block of code multiple times
A way to print output
A way to define a function
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the main purpose of statements such as if, elif, and else in Python?
To store information
To decide which code to run based on conditions
To repeat code
To receive input
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct way to check the length of a string in Python?
size("hello")
count("hello")
len("hello")
length("hello")
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the break statement do in a loop?
It skips the current iteration.
It ends the loop immediately.
It starts the loop over.
It prints a message.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is an example of a while loop in Python?
while True:
print("Hello")
This is a for loop.
This is a while loop.
This is an if statement.
This is a function.
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
21 questions
Visual Basic Assessment
Quiz
•
11th - 12th Grade
20 questions
Computer
Quiz
•
4th - 7th Grade
20 questions
Alat Proses
Quiz
•
9th Grade
20 questions
TIK 7 - Simulasi #1
Quiz
•
7th Grade
20 questions
1.1.3 Proses Penyelesaian Masalah
Quiz
•
11th Grade
20 questions
Pengetahuan Dasar Komputer
Quiz
•
9th - 12th Grade
20 questions
PH SIMKMDIG KD 3.1 Menerapkan Logika dan Algoritma Komputer
Quiz
•
1st - 10th Grade
20 questions
PARC Linux Basic Part 2
Quiz
•
University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
