
2. If Elif and Else
Authored by Jeremy Talbot
others
Used 3+ 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.
OPEN ENDED QUESTION
1 min • 1 pt
Can you identify the issue present in this snippet of code?
Evaluate responses using AI:
OFF
Answer explanation
Because there is only 1 equals sign for the if statement.
2.
OPEN ENDED QUESTION
1 min • Ungraded
What would be the output of the code above?
Evaluate responses using AI:
OFF
Answer explanation
Sorry you cannot afford to buy apples
3.
OPEN ENDED QUESTION
1 min • Ungraded
What is the problem with this code?
Evaluate responses using AI:
OFF
Answer explanation
You’re checking to see if a variable called capital (which doesn’t exist) is equal to the word “Tokyo”, when it needs to be comparing it to the variable answer (which exists)
4.
OPEN ENDED QUESTION
1 min • Ungraded
What will the output be when you have less then $5?
Evaluate responses using AI:
OFF
Answer explanation
Sorry you do not have enough money to make a purchase
5.
OPEN ENDED QUESTION
1 min • Ungraded
Fill in the blank line
Evaluate responses using AI:
OFF
Answer explanation
elif arrive == “yes”:
6.
OPEN ENDED QUESTION
1 min • Ungraded
Referencing the code, which print function will execute?
Evaluate responses using AI:
OFF
Answer explanation
Great Work
7.
OPEN ENDED QUESTION
1 min • Ungraded
A female soccer team is looking for female players older than 12 years of age. Fill in the blank to abide by these 2 conditions.
Evaluate responses using AI:
OFF
Answer explanation
age = int(input(“How old are you”))
sex = input(“Are you female or male? Type ‘m’ for female or ‘f’ for female: “)
if age > 12 and sex == “f”:
print(“You are eligible for the team”)
else:
print(“Sorry you are not eligible for the team”)
OR
age = int(input(“How old are you”))
sex = input(“Are you female or male? Type ‘m’ for female or ‘f’ for female: “)
if sex == “f” and age > 12:
print(“You are eligible for the team”)
else:
print(“Sorry you are not eligible for the team”)
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
Revision #2
Quiz
•
KG - University
12 questions
Free time activities
Quiz
•
KG - University
10 questions
Simple Present #2
Quiz
•
KG - University
10 questions
Week 5 Quiz
Quiz
•
KG - University
10 questions
Photoshop quiz
Quiz
•
KG - University
12 questions
C1 - States of matter Revision
Quiz
•
KG - University
10 questions
DSD QUIZZ 2 2023 Batch
Quiz
•
KG - University
10 questions
Vocabulary Comprehension
Quiz
•
12th Grade
Popular Resources on Wayground
8 questions
Spartan Way - Classroom Responsible
Quiz
•
9th - 12th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
3 questions
Integrity and Your Health
Lesson
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
9 questions
FOREST Perception
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
Discover more resources for others
8 questions
Spartan Way - Classroom Responsible
Quiz
•
9th - 12th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
14 questions
Boundaries & Healthy Relationships
Lesson
•
6th - 8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
3 questions
Integrity and Your Health
Lesson
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
9 questions
FOREST Perception
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade