Question: Please answer as soon as possible using python as the programming language and explain what you did in detail. For this exercise you will design

Please answer as soon as possible using python as the programming language and explain what you did in detail.

Please answer as soon as possible using python as the programming languageand explain what you did in detail. For this exercise you will

For this exercise you will design and implement a program that starts with an empty list and then uses a loop to repeatedly ask the user if they would like to add an another value to the list, remove the last value added to the list, or exit the loop. This program must not ask the user how many values they intend to add to the list, so you will not know exactly how long the final list will be until the user has chosen to exit the loop. When your program has finished, it must print the length of the list provided without using the len function. In order to complete this task, you will need to: - decide on what "data type" of value (i.e., bool, char, int, etc.) your list will store - ensure you know how to use the "append", "insert", and "pop" list methods Your submission for this exercise: - must be a source code file with filename 1 'comp1405_w23_\#\#\#\#\#\#\#\#\#_tutorial_06_a.py' - must use an event-controlled loop to determine when the manipulations of the list should stop - must include a branch within the body of the loop where the user can describe the operation - must not use the "len" function to determine the length of the list provided For this exercise you will design and implement a program that starts with an empty list and then asks the user for a positive integer n and transforms the list into one containing n random integers. Your program must then use a counter-controlled loop inside an event-controlled loop to allow the user to replace any of those integers with other strings (e.g., replace 1s with "hello", with the integer 1 and the string "hello" specified by the user). To this program you must then add a function that counts the number of times a particular string (specified by the user) appears in the list. In order to complete this task, you will need to: - select an integer value to use when your list is first "populated" Your submission for this exercise: - must be a source code file with filename 'comp1405_w23_\#\#\#\#\#\#\#\#\#_tutorial_06_b.py' - must include a string counting function (with list and string arguments and an integer return)

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!