Question: Python programming Screenshot plz | 75.5% Part V: Car Rental (20 points) Write a function car.rental) that takes rentals, which is a list of sub-lists,

Python programming Screenshot plz
| 75.5% Part V: Car Rental (20 points) Write a function car.rental) that takes rentals, which is a list of sub-lists, as its only argument. Each sub-list always has three elements in the following order 1. Type of membership: a string that is one of Student"'Faculty' or 'Visitor 2. Type of car a string that is one of Coupe'. 'Sedan'. 'SUv or Hybrid' 3. Duration: the number of hours the car was borrowed for The cars provide free service for up to certain number of hours based on the type of membership: 1. Student': first three hours are free 2. Faculty first two hours are free 3. 'Visitor: first hour is free A fter free service is over, the members are charged based on the type of car they have rented: . Sedan: $10 per hour CSE 101- Fall 2017 Homework #2 Page 4 . Coupe: $12 per hour . SUV: $13 per hour . Hybrid: $15 per hour Your function calculates the total money generated by each car type, i.e. how mucheach charged after free service was over. Store the integer income generated by each type of car at its corresponding index in the list car_type, which has been provided for you in homework2.py . at index 0 store the total income generated by Sedans . at index 1 store the total income generated by Coupes , at index 2 store the total income generated by SUVs , at index 3 store the total income generated by Hybrids Examples: Return Value Function Call [ [ student , , , Coupe, , 4 1, Faculty, , , Coupe, . 4 ] . 'Visitor','Coupe', 4]1 I [' Student','Coupe', 4], I'Faculty suV 41, "Vi sitor','Hybrid, , 4], ["Visitor','sedan, ' 411 [I' student, Coupe' 3. Faculty921 L0, 72, 0, 01 130, 12, 26, 45) 130, 0, 0, 0 Visitor, 'Hybrid,11, I'visitor''Sedan' 411
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
