Question: omplete the table below that lays out syntax and use rules for the if , elif, and else keywords. Rule Correct Example Incorrect Example A
omplete the table below that lays out syntax and use rules for the if elif, and else keywords.
Rule Correct Example Incorrect Example
A set of branches must be
gin with the if keyword
cond x :
Branches must use an ex
pression that evaluates to
the Boolean type
if value :
Branches must end their
line with a colon after the
Boolean expression
if booleanvar
if x :
x
y b
#print not in branch
printdone
if x :
#nothing in the branch
printdone
or more branches can
start with elif, but only af
ter an initial if branch
if val :
print
elif val :
print
elif val :
print
or else branches can be
used at the end of a series
of branches
if y 'test' :
printnot test'
else:
printtest
else:
printwont work"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
