Question: Good evening I have two different questions for my Python class that I need help with that I cannot seem to find out. I have

Good evening I have two different questions for my Python class that I need help with that I cannot seem to find out. I have attached a screenshot of the questons. Thank you in advance for helping with these questions. Question 1:
Write a function that meets the following requirements:
Creates a list with 100 randomly chosen integers between 1 and 100.
Prompts the user to enter the index of the array, then displays the corresponding element value.
If the specified index is out of bounds, display the message "Out of Bounds."
?****** Use a try/except for the error.
Question 2:
Write a program (function) for a hotel salesperson to enter sales in a text file. Each line contains
the following, separated by semicolons: The name of the client, the service sold (such as Dinner,
Conference, Lodging) and the amount of the sale. Display an error if the amount is not a number
(ex: 45.50 or 45).
Write another program (function) that reads the file created and displays the total amount for each
service category. Display an error if the file does not exist.
"Use try/except for error.
Good evening I have two different questions for

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 Programming Questions!