Question: def menu _ choice ( ) : print ( 1 . Sweater ) print ( 2 . Suit ) print ( 3
def menuchoice:
print Sweater"
print Suit"
printExit"
choice inputEnter your choice:
return choice
def main:
while True:
choice menuchoice
if choice :
printSweater
elif choice :
printSuit
elif choice :
break
else:
printInvalid choice. Please try again."
main
Can you use one more collections to improve the efficiency of this code?
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
