Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help pls 94.py q1.py Guide 1 anew_list_function definition goes here Collapse Question 1 def main() : #loop to ask users for values goes here

Need help pls

image text in transcribed
94.py q1.py Guide 1 anew_list_function definition goes here Collapse Question 1 def main() : #loop to ask users for values goes here input_str = input('Enter value to be added to list: \ ' ) Content new_list = new_list_function(initial_list) #print values in new list 1. Write a program that keeps asking the user for new values to be added main( ) 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 . 2. Then, write a function called new_list_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. Example interaction: 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 1306 (7:1) Terminal Note 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') TRY IT Click the Check it button to submit your code to the auto-grader. Check It Next

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

Step: 3

blur-text-image

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

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions