Question: Multiple Choice: Refer to the following code, what will the print statement on line 7 display? - - - - - - - - -
Multiple Choice:
Refer to the following code, what will the print statement on line display?
flowers white: "lily",
red: "rose",
blue: "carnation",
yellow: "buttercup"
colors listflowerskeys
colors.sort
showcolors "Colors of flowers:
for color in colors:
showcolors color
printshowcolors
pickcolor inputEnter a color:
pickcolor pickcolor.lower
if pickcolor in flowers:
name flowerspickcolor
printFlower name: name
else:
printThere is no pickcolor flower."
Multiple Choice:
Refer to the following code, what will the print statement on line display?
flowers white: "lily",
red: "rose",
blue: "carnation",
yellow: "buttercup"
colors listflowerskeys
colors.sort
showcolors "Colors of flowers:
for color in colors:
showcolors color
printshowcolors
pickcolor inputEnter a color:
pickcolor pickcolor.lower
if pickcolor in flowers:
name flowerspickcolor
printFlower name: name
else:
printThere is no pickcolor flower."
Colors of flowers: white red blue yellow
Colors of flowers: lily rose carnation buttercup
Colors of flowers: buttercup carnation lily rose
Colors of flowers: blue red white yellow
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
