Question: Code Example 3 - 1 num _ widgets = 0 while True: choice = input ( Would you like to buy a widget? (

Code Example 3-1 num_widgets =0 while True: choice = input("Would you like to buy a widget? (y/n): ") if choice.lower()=="y": num_widgets +=1 else: break print("You bought", num_widgets , "widget(s).") Refer to Code Example 3-1. Which of the following could be a pseudocode plan for the program? a. Define widget count variable IF user buys widgets add 1 to widget count ELSE end loop Display results b. Define widget count variable Begin infinite loop Get user input IF user buys widget add 1 to widget count ELSE end loop Display results c. Get user input Loop WHILE user wants to continue IF user buys widget add 1 to widget count Get user input Display results d. Get user input Loop while input !=y IF user buys widget add 1 to widget count ELSE end loop Display results

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!