write a simple python program

0 comments

Write a program that loads in the attached file and allows you to select movies to rent until the user exits, it should output the movies chosen into a file called ”ChosenMovies.txt”, the program should handle error cases
SAMPLE OUTPUT:

Loading File…
Not the correct format: NULL1984
Not the correct format: TOOMANYCOMMAS,,,,,,9999
Second element is not an integer: ONE,ONE
Choose a movie to rent:
1:2001(1968)
2:Metropolis(1927)
3:Blade Runner(1982)
4:Alien(1979)
5:The Wizard of Oz(1939)
6:ET(1982)
7:Star Wars(1977)
8:Close Encounters(1977)
9:King Kong(1933)
10:The Matrix(1999)
11:Back to the Future(1985)
12:Planet of the Apes(1968)
13:Brazil(1985)
14:Done Renting
Enter Choice: ET
Enter a number
Enter Choice: 2001
Number not in range
Enter Choice: 1
Renting 2001(1968)
Choose a movie to rent:
1:Metropolis(1927)
2:Blade Runner(1982)
3:Alien(1979)
4:The Wizard of Oz(1939)
5:ET(1982)
6:Star Wars(1977)
7:Close Encounters(1977)
8:King Kong(1933)
9:The Matrix(1999)
10:Back to the Future(1985)
11:Planet of the Apes(1968)
12:Brazil(1985)
13:Done Renting
Enter Choice: 2 Renting Blade Runner(1982)
Choose a movie to rent:
1:Metropolis(1927)
2:Alien(1979)
3:The Wizard of Oz(1939)
4:ET(1982)
5:Star Wars(1977)
6:Close Encounters(1977)
7:King Kong(1933)
8:The Matrix(1999)
9:Back to the Future(1985)
10:Planet of the Apes(1968)
11:Brazil(1985)

12:Done Renting
Enter Choice: 12
Saving Choices…
SAMPLE ChosenMovies.txt:

2001,1968
Blade Runner,1982

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount! Use Discount Code “Newclient” for a 15% Discount!NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.

The post write a simple python program appeared first on The Nursing TermPaper.

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}