Question: def menu _ choice ( ) : print ( 1 . Sweater ) print ( 2 . Suit ) print ( 3

def menu_choice():
print("1. Sweater")
print("2. Suit")
print("3.Exit")
choice = input("Enter your choice: ")
return choice
def main():
while True:
choice = menu_choice()
if choice =="1":
print("Sweater")
elif choice =="2":
print("Suit")
elif choice =="3":
break
else:
print("Invalid 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!