You have been asked to write a program that will allow your client Tigger Movie Rentals to keep track of their inventory. For the purposes of this program, we will assume they only have one copy of each movie in the inventory. Your program should: Continue until the user wishes to exit the program (use a loop) Give the user 4 options from a menu: list – list all movies add – add a movie del – delete a move exit – exit the program Example (does not have to match this exactly):
You have been asked to write a
track of their inventory.
For the purposes of this program, we will assume they only have one copy of each movie in the
inventory.
Your program should:
Continue until the user wishes to exit the program (use a loop)
Give the user 4 options from a menu:
list – list all movies
add – add a movie
del – delete a move
exit – exit the program
Example (does not have to match this exactly):
Command Menu
list - List all movies
add - Add a movie
del - Delete a movie
exit - Exit program
If the user enters an option other than those 4, provide an error message and ask the user to
re-enter the selection
The list of movies in inventory will be stored in a file named movies.txt (a starting version of
the file is provided). You can assume the file is stored in the same directory as the .py file.
When the list option is selected, a list of the current inventory will be displayed to the
screen
Example (does not have to match this exactly):
Command: list
1. Monty Python and the Holy Grail (1975)
2. On the Waterfront (1954)
3. Cat on a Hot Tin Roof (1958)
4. Gone with the Wind (1939)
When the delete option is selected, the user will be asked to select which movie should be
deleted. After the movie is deleted, a confirmation message should be displayed saying
which movie was deleted
Example (does not have to match this exactly):
Gone with the Wind was deleted
When the add option is selected, the user should be prompted to enter the name of the
movie and the year it was released. After the movie is added, a confirmation message should
be displayed saying which movie was added.
When the exit option is selected, exit the loop and display:
A total of how many movies are now in the inventory.
How many movies were added during this session?
How many movies were deleted during this session?
You must use a separate function for the following items:
List the movies
Add the movies
Delete the movies
You can use additional functions in your program if you choose.
Be sure to include appropriate documentation at the start of the program and within the
program
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images