NEW
Font size
WorksheetsNested Ifs Part 2
Total questions: 40
Worksheet time: 20mins
Which of these function categories allow you to evaluate conditions and usually return a value of either TRUE or FALSE?
Date & Time Functions
Lookup & Reference Functions
Math & Trig Functions
Logical Functions
Which of these functions will you use if you wish to evaluate more than one condition?
IF()
IFS()
IFELSE()
IFELSES()
In the function =IF(SUM(B3:B6)>10, "Yes", "No"), which of the two functions will be evaluated first?
IF()
SUM()
What is the result?
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!")
You can buy some gum
You are rich
Get a job!
You are rich
Get a job!
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!
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!
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!
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!
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!
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!
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!")
‘If’ is a decision making statement
TRUE
FALSE
There can be an else statement without an if statement
FALSE
TRUE
What is it called when we put an if statement inside of another if statement's body?
grouping
looping
nesting
iterating
What will this code snippet print if the value of num is 12?
A
B
C
D
If age has the value 32, what will be printed?
GROUP 1
GROUP 2
GROUP 3
GROUP 4
If age has the value 14, what will be printed?
GROUP 1
GROUP 2
GROUP 3
GROUP 4
If age has the value 18, what will be printed?
GROUP 1
GROUP 2
GROUP 3
GROUP 4
What will this code snippet print if the value of num is 5?
A
B
C
D
What will be displayed with this code?
Ben is smart
Adam is smart
Nothing
What will be displayed with this code?
Grant is amazing
Noah is amazing
Zach is amazing
Nothing
What will be displayed with this code (pay attention to the variables)?
Belle is wonderful
Krista is wonderful
Allison is wonderful
Nothing
What will be displayed with this code (pay attention to the variables)?
The Best
Average
Nothing
What will be displayed with this code (pay attention to the variables)?
Purdue
IU
Butler
Nothing
What will be displayed with this code (pay attention to the variables)?
Taylor is going to North Carolina
Taylor is going to IU
Nothing
What will be displayed with this code (pay attention to the variables)? The percentage sign here means that the reminder obtained by 5 / 3. So t reads, that "t" is assigned the result of the remainder of 5 divided by 3 multiple by 9
Jacob is a better Nascar fan
Tarun is a better Nascar fan
Nothing
mickey = mouse .
if mickey == mouse: .
. print("Mickey is a mouse")
.else: .
. print("Minnie rules") .
john = 5 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
John is getting grapes
John is getting grapes
john = 10 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
John is getting grapes
John is getting grapes
john = 8 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
John is getting grapes
John is getting grapes
john = 8 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
John is getting grapes
John is getting grapes
john = 6 .
if john > 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
John is getting grapes
John is getting grapes
john = 6 .
if john != 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
. print("John is getting grapes")
John is getting grapes
John is getting grapes
What is my result?
john = 3 .
if john < 6: .
. print("John is getting ice cream")
else: .
. print("John is getting apple juice")
print("John is getting grapes") .
John is getting ice cream
John is getting grapes
John is getting apple juice
John is getting grapes
John is getting apple juice
John is getting ice cream
The "If" Statement is an example of a _________________
Correctional Statement
Competitive Statement
Conditional Statement
Inquisitive Statement
True/False: The body of an "if" statement will only be executed if the condition is true.
True
False
Which of these is used to add a third, fourth, etc outcome to a scenario?
otherwise
else if
iff
elsa
What will be the output of the code?
Even
EvenDivisible by 3
Even
Divisible by 3
Not Divisible by 6
What is the output?
True
False
condition1
condition2
What is the output?
True
False
condition1
condition2
