
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
MID-TERM REVISION
Quiz
•
KG - University
10 questions
Week 3 Quiz
Quiz
•
KG - University
12 questions
Viaje en Avión Test
Quiz
•
8th Grade
15 questions
Calculating Cell Potential Quiz Review
Quiz
•
10th Grade
12 questions
Cruella Adverbs
Quiz
•
6th - 8th Grade
14 questions
The Regions Where Jesus Taught
Quiz
•
9th - 12th Grade
10 questions
Up to Multi-Step Word Problems
Quiz
•
KG - University
10 questions
U02 Review Vocabulary Test
Quiz
•
KG - 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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for others
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade