#Ez pass question (Oct 4 q.5) for any number of people that crossing the bridge #on specific day #input: n - number of people, for each person user enters car type: 1 or 2 and Ez #Pass indicator: 0 - no Ez pass, 1 - Ez pass n = int(input("enter number of people who crossed the bridge ")) i = 0 cost = 0 while(i < n): print("processing person", i+1) car = int(input("enter car type ")) ez_pass=int(input("enter ez pass indicator ")) if(ez_pass==1): cost=cost+4.5 elif(car==1): cost=cost+5 else: cost=cost+6 i=i+1 print("total cost per day for all people",cost*2)