
2. If Elif and Else

Quiz
•
others
•
•
Easy
Jeremy Talbot
Used 3+ times
FREE Resource
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
Evaluate responses using AI:
OFF
Answer explanation
Sorry you cannot afford to buy apples
3.
OPEN ENDED QUESTION
1 min • Ungraded
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
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
Evaluate responses using AI:
OFF
Answer explanation
elif arrive == “yes”:
6.
OPEN ENDED QUESTION
1 min • Ungraded
Evaluate responses using AI:
OFF
Answer explanation
Great Work
7.
OPEN ENDED QUESTION
1 min • Ungraded
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”)
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Unit 6 Energy and Heat vocabulary

Quiz
•
KG - University
11 questions
Java Refresher

Quiz
•
KG - University
12 questions
Role of programming language

Quiz
•
KG - University
10 questions
c2 2-3 Variables Constants and Input - GCSE QUIZ

Quiz
•
KG - University
10 questions
New Zealand Cadet Forces Code of Conduct Quiz

Quiz
•
KG - University
10 questions
"Mastering Python Basics"

Quiz
•
KG - University
15 questions
AP Computer Science Principles CODE UNIT 7 Assessment

Quiz
•
KG - University
8 questions
L1 Python Recall - Do Now

Quiz
•
KG - University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for others
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade