
Python booleans & if/elif/else
Flashcard
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Student preview

10 questions
Show all answers
1.
FLASHCARD QUESTION
Front
The result of this program:
Friday = False
if Friday:
...print "Jeans day!"
else:
...print "Dress code"
Options: Jeans day, Dress code, Nothing prints, Error
Back
Dress code
2.
FLASHCARD QUESTION
Front
What is the result of the code:
team = "Cowboys"
if team = "Cowboys":
...print "Dallas is #1"
Back
Error
3.
FLASHCARD QUESTION
Front
What is the output of the following code:
income = 4001
if income > 3000:
...print("Income is greater than 3000")
elif income > 4000:
...print("Income is greater than 4000")
Back
Income is greater than 3000
4.
FLASHCARD QUESTION
Front
Suppose you write the code to display "Cannot get a driver's license" if age is less than 16 and "Can get a driver's license" if age is greater than or equal to 16. Which of the following code is the best? Options: if age < 16: ...print("Cannot get a driver's license") if age >= 16: ...print("Can get a driver's license"), if age < 16: ...print("Cannot get a driver's license") else: ...print("Can get a driver's license"), if age < 16: ...print("Cannot get a driver's license") elif age >= 16: ...print("Can get a driver's license"), if age < 16: ...print("Cannot get a driver's license") elif age > 16: ...print("Can get a driver's license") elif age == 16: ...print("Can get a driver's license")
Back
if age < 16:
...print("Cannot get a driver's license")
else:
...print("Can get a driver's license")
5.
FLASHCARD QUESTION
Front
Assume x = 4 and y = 5. Which of the following is true?
Options: x < 5 and y < 5, x < 5 or y < 5, x > 5 and y > 5, x > 5 or y > 5
Back
x < 5 or y < 5
6.
FLASHCARD QUESTION
Front
What is the output of the following code?
ch = "F"
if ch == "f" and ch == "F"
...print(ch)
Back
nothing
7.
FLASHCARD QUESTION
Front
What is the output of the following code?
ch = "F"
if ch == "f" or ch == "F":
...print(ch)
Back
F
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
Concept check PDLC part 3
Flashcard
•
11th Grade - University
9 questions
vocabulary quiz 2 ap lit
Flashcard
•
11th Grade
6 questions
UBHL3 BW Finance
Flashcard
•
9th - 12th Grade
15 questions
PCS Typing Questions MC
Flashcard
•
9th - 12th Grade
3 questions
PHOTO-LOG "LOHIKA'T LARAWAN, SOLUSYONAN N'YO!"
Flashcard
•
11th Grade
5 questions
[TUR] Python NEW_М1L2
Flashcard
•
KG
9 questions
عناوين العمليات بلغة جافا
Flashcard
•
10th Grade - University
10 questions
Print Culture in the Modern World
Flashcard
•
9th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade