
Snack Shop Debugging Quiz
Authored by Nada Ali
Information Technology (IT)
8th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is wrong with this line of code? snacks = ["popcorn", "soda" "chocolate"]
Nothing is wrong
Missing a comma between "soda" and "chocolate"
Python doesn’t allow lists with 3 items
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why does this code cause an error? print("Available snacks are: " + snacks)
The list must be printed separately
The variable snacks is undefined
You can’t use print on lists
3.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which line of code prints the snacks list without error?
print("Available snacks are:", snacks)
print(f"Available snacks are: {snacks}")
Both a and b
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you print the snacks like this: Available snacks are: popcorn, soda, chocolate
print("Available snacks are: " + snacks)
print(f"Available snacks are: {snacks}")
print("Available snacks are: " + str(snacks))
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is this an error? popcorn = "30"
30 is too high for a price
It is stored as a string, not an integer
Python doesn’t allow numbers
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What data type does input() always return in Python?
int
str
float
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do we correctly ask the user for a number of popcorns?
popcorn_qty = input("How many popcorns? ")
popcorn_qty = int(input("How many popcorns? "))
int = input("How many popcorns? ")
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
9 questions
Увлекательный мир Python
Quiz
•
6th Grade - University
17 questions
Loģiskās Standartfunkcijas un Diagrammas Exceli
Quiz
•
8th Grade
10 questions
Lego Spike & Python - Challenge 3 Quiz
Quiz
•
6th - 8th Grade
11 questions
ESTRUTURAS DE REPETIÇÃO
Quiz
•
6th - 8th Grade
10 questions
Informatika Kelas 8
Quiz
•
8th Grade
12 questions
Тест з теми 'Списки – змінювані послідовності'
Quiz
•
7th Grade - University
10 questions
Common Webpage Buttons
Quiz
•
8th Grade - University
15 questions
Quiz sobre el ornitorrinco y la programación
Quiz
•
8th Grade - 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 Information Technology (IT)
5 questions
Legends, Leaders, & Changemakers: Maya Angelou
Interactive video
•
6th - 8th Grade
10 questions
Understanding Poetry and Literary Devices
Interactive video
•
4th - 8th Grade
15 questions
Product of Powers Property A1 U7
Quiz
•
8th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
20 questions
Laws of Exponents
Quiz
•
8th Grade
16 questions
8th U5L5 Graphs of Functions
Quiz
•
8th Grade
20 questions
Graphing Inequalities on a Number Line
Quiz
•
6th - 9th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade