Mini Quiz 1 CSCI 152 Friday Jan 17

Write your program in ONE FILE.

Your program will process traffic on the bridge. The following rules apply:
  1. all cars with EZ-pass pay $3 to pass the bridge
  2. small cars without EZ-pass pay $4.50
  3. trucks and buses pay $5
  4. There is 10% discount on weekends
You can assume that

Write a function

def process(num_cars):

that has one parameter - number of the cars that passed the bridge on the specific day. The function reads license number for each car and return the number of EZ-pass cars, small cars and trucks/buses that passed the bridge on that day.

Write a function

def cost(num_cars, fee, day):

that has 3 parameters - number of cars of specific category, fee for that category and day of the week. This function returns the total bridge cost for cars of specific category on specific day of the week.

Write a program that asks user to enter the total number of the cars that passed on the bridge and the numeric value of the day (1 - 7, assume weekend is 7 and 1). The program is using both functions to find the total amount of money was paid to the bridge authority on specific day.

Example:
Input (in main): 5, 2
Input (in function process): 10 100 101 10 67
Output: 20 dollars (since the day is Monday there is no discount, and there are 2 EZ-pass cars, 2 small cars, and one truck/bus: 2*3 + 2*4.5 + 1*5 = 20 dollars)