Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit ('exit' should NOT

image text in transcribed

image text in transcribed

Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit ('exit' should NOT be added to the list). These values entered by the user are added to a list we call initial_ list. Then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. Finally, inside main(). print out all of the values in the new list. For example: Input: Enter value to be added to list: a Enter value to be added to list: b Enter value to be added to list: c Enter value to be added to list: exit Output: Note how exit is NOT added to the list. Also, your program needs to be able to handle any variation of exit such as Exit, EXIT etc. and treat them all as 'exit Python 3.5 Code # new-list-function definition goes here 4- def main): 5 #100p to ask users for values goes here input str input('Enter value to be added to list:' 7 new list new_list_function(initial_list) 8 #print values in new list 9 main) 10 Expand

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Repairing And Querying Databases Under Aggregate Constraints

Authors: Sergio Flesca ,Filippo Furfaro ,Francesco Parisi

2011th Edition

146141640X, 978-1461416401

More Books

Students also viewed these Databases questions

Question

What is the relation between ROC and AUC?

Answered: 1 week ago