Question: PYTHON PYTHON Write a program that allows the user to add, delete and organize the items in a list. The program should not allow duplicate

PYTHON PYTHON

Write a program that allows the user to add, delete and organize the items in a list.

The program should not allow duplicate values in the list.

Your program will provide the following options:

Append: adds an items, input by the user, at the end of the list.

Delete: removes an item indicated by the user from the list.

Move up: moves an item indicated by the user, to the previous position in the list.

Move Down: moves an item indicated by the user to the next position in the list.

Move Top: moves an item indicated by the user to the the first spot in the list.

Move Bottom: moves an item indicated by the user to the last position in the list.

Swap: swaps two items indicated by the user in the list.

List all: display the items in the list; one item per line.

Quit: allows the user to end the program.

Your program shall show appropriate error messages when trying to move, swap, or delete items not found in the list.

You program shall also properly handle invalid actions, like trying to move up the first item in the list, or trying to move down the last item in the list.

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!