Nested if...else statements

Quiz
•
Computers
•
6th - 8th Grade
•
Medium
Used 140+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 10 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
Get a job!
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 6 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
Get a job!
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 1 .
if number_of_coins == 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
Get a job!
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 1 .
if number_of_coins < 6: .
. print("You can buy some gum")
else: .
if number_of_coins == 10:
. print("You are rich")
else: .
. print("Get a job!")
Get a job!
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 7 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
Get a job!
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 6 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
Get a job!
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 3 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
else: .
. print("Get a job!")
Get a job!
8.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
number_of_coins = 2 .
if number_of_coins > 6: .
. print("You can buy some gum")
else: .
if number_of_coins < 10:
. print("You are rich")
. print("Get a job!")
Similar Resources on Wayground
12 questions
Python

Quiz
•
7th - 8th Grade
10 questions
Python Variables

Quiz
•
7th - 12th Grade
10 questions
Year 7 Python Lesson 1 Recap

Quiz
•
8th Grade
10 questions
KODU

Quiz
•
3rd - 6th Grade
8 questions
if...else statements

Quiz
•
6th - 8th Grade
10 questions
MOAC Excel 2016 Lesson 03

Quiz
•
8th - 12th Grade
12 questions
Year 7 Python

Quiz
•
7th Grade
10 questions
Python Programming

Quiz
•
7th - 9th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade
Discover more resources for Computers
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
13 questions
Primary and Secondary Sources

Quiz
•
6th Grade
15 questions
Decimal Operations

Quiz
•
6th Grade
10 questions
Plotting Points on the Coordinate Plane

Quiz
•
7th - 8th Grade