0%
0 / 15 answered
Nested Conditionals Practice Test
•15 QuestionsQuestion
1 / 15
Q1
In this shopping-cart pseudo-code, which conditions must be met for message "VIP+Season" to print?
// Inputs: isMember, total, isSeasonSale
IF isMember
IF total >= 100
IF isSeasonSale
PRINT "VIP+Season"
ELSE
PRINT "VIP"
ELSE
PRINT "Member"
ELSE
IF total >= 150
IF isSeasonSale
PRINT "Guest+Season"
ELSE
PRINT "Guest"
ELSE
PRINT "NoDeal"
In this shopping-cart pseudo-code, which conditions must be met for message "VIP+Season" to print?
// Inputs: isMember, total, isSeasonSale
IF isMember
IF total >= 100
IF isSeasonSale
PRINT "VIP+Season"
ELSE
PRINT "VIP"
ELSE
PRINT "Member"
ELSE
IF total >= 150
IF isSeasonSale
PRINT "Guest+Season"
ELSE
PRINT "Guest"
ELSE
PRINT "NoDeal"