
Python Programming Quiz
Quiz
•
Computers
•
1st Grade
•
Practice Problem
•
Hard
Adham Elmuntser
Used 1+ times
FREE Resource
Enhance your content in a minute
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following will correctly prompt the user to enter a number and print it?
num = input("Enter a number: ") print(f"You entered: {num}")
num = input("Enter a number: ") print("You entered: " + num)
num = int(input("Enter a number: ")) print(f"You entered: {num}")
num = int(input("Enter a number: ")) print("You entered: " + num)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly uses an if-elif-else statement?
if x > 10: print("x is greater than 10") elif x < 10: print("x is less than 10") else: print("x is equal to 10")
if x > 10: print("x is greater than 10") elif x < 10: print("x is less than 10") else: print("x is 10")
if x > 10: print("greater") elif x < 10: print("less") else: print("equal")
if x > 10 print("x is greater than 10") elif x < 10 print("x is less than 10") else print("x is equal to 10")
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following for loop? for i in range(5): print(i)
1 2 3 4 5
0 1 2 3 4
0 1 2 3 4 5
1 2 3 4
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which while loop will print the numbers 0 to 4?
count = 0 while count < 5: print(count) count += 1
count = 0 while count < 5: print(count) count = count + 1
count = 0 while count < 5: print(count); count += 1
count = 0 while count < 5: print(count); count = count + 1
5.
OPEN ENDED QUESTION
3 mins • 1 pt
How can you create a list and print its contents?
Evaluate responses using AI:
OFF
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following correctly creates and prints a set?
my_set = {1, 2, 3, 4, 5}; print(my_set)
my_set = set([1, 2, 3, 4, 5]); print(my_set)
my_set = {1, 2, 3, 4, 5}; print(set(my_set))
my_set = {1, 2, 3, 4, 5}; print(str(my_set))
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you create a tuple and print its elements?
my_tuple = (1, 2, 3); print(my_tuple)
my_tuple = tuple([1, 2, 3]); print(my_tuple)
my_tuple = (1, 2, 3) for item in my_tuple: print(item)
my_tuple = (1, 2, 3); print(list(my_tuple))
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
Already have an account?
Similar Resources on Wayground
20 questions
Class-1 Data and memory
Quiz
•
1st Grade
20 questions
ĐÁP ÁN KTTX số 1 - Tin 7 - HK2 - NH: 24 -25
Quiz
•
1st Grade - University
20 questions
POWERPOINT
Quiz
•
1st - 5th Grade
20 questions
HTML- TABLE
Quiz
•
1st - 3rd Grade
15 questions
The Internet
Quiz
•
1st - 5th Grade
15 questions
Intro to Small Basic
Quiz
•
KG - 7th Grade
15 questions
Input & Output Devices
Quiz
•
1st - 6th Grade
15 questions
ASK F2 -KOD ARAHAN (PYTHON)
Quiz
•
1st Grade - University
Popular Resources on Wayground
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
15 questions
Solving Equations with Variables on Both Sides Review
Quiz
•
8th Grade
Discover more resources for Computers
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
16 questions
Christmas 1st grade
Quiz
•
1st Grade
10 questions
Exploring the Water Cycle
Interactive video
•
1st - 5th Grade
20 questions
Place Value
Quiz
•
KG - 3rd Grade
20 questions
Modules 4 - 6 CBA Review
Quiz
•
1st Grade
10 questions
Exploring the American Revolution
Interactive video
•
1st - 5th Grade
7 questions
Attack on Pearl Harbor for Kids | Bedtime History
Interactive video
•
1st - 12th Grade
15 questions
Addition and Subtraction Facts
Quiz
•
1st - 2nd Grade
