Question: Problem 2 Write code that builds a list of a user's favorites things. Do the following: 1. Initialize a variable to an empty list 2.

 Problem 2 Write code that builds a list of a user's

Problem 2 Write code that builds a list of a user's favorites things. Do the following: 1. Initialize a variable to an empty list 2. Iterate continuously using while: A. Accept a input from the user. B. If the user input is equal to none or None: a. Terminate the loop C. Append the user input to the list. 3. Print the list []: favthings =[] while True: word=input("What's your favorite thing?") if word=="none" or word=="None": break favthings.append(word) print("Your favourite things is: ", favthings) Sample input and output: Given the input below: Input a favorite thing of yours, 'None' or 'none' to exit: books Input a favorite thing of yours, 'None' or 'none' to exit: movies Input a favorite thing of yours, 'None' or 'none' to exit: none The expected output is: ['Books', 'Movies']

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!