O o Write a function, computeFare(), that takes as two parameters: the zone and the ticket type, ...
o o Write a function, computeFare(), that takes as two parameters: the zone and the ticket type, and returns the Long Island Railroad fare If the zone is 1 and the ticket type is "peak", the fare is 8.75 o If the zone is 1 and the ticket type is "off-peak", the fare is 6.25 o If the zone is 2 or 3 and the ticket type is "peak, the fure is 10.25 If the zone is 2 or3 and the ticket type is "off-peak", the fure is 7.50. e If the zone is 4 and thc tickct type is "peak", the farc is 12.00 » If the zone is 4 and the ticket type is "off peak", the fare is 8.75 « If the zone is 5, 6, or 7 and the ticket type is 'peak", the fare is 13.50 。If the zone is 5, 6, or 7 and the ticket lype is 'olf-peak". Lhe fare is 9.75. If the zone is greater thun 8, return a negative number (since your calculator does not handle inputs thut high) A template program LTRR tran İt. py, s available on the of the function must match cxactly (clsc, the scripts cannot find it) n ei e grading scr t does not run the whole progra but nstend ests ou function se arate y un te s todete nu e com tress As such, ename A sample run: Enter the number of zonest Enter the ticket type (peak/ofr-peak: ofr-peak The fare i» 9.75 And another number of zoncs: 6 Enter the Enter tbe ticket type (peak orf-peak peak The fare is 13.5 Hint: See Lah s
o o Write a function, computeFare(), that takes as two parameters: the zone and the ticket type, and returns the Long Island Railroad fare If the zone is 1 and the ticket type is "peak", the fare is 8.75 o If the zone is 1 and the ticket type is "off-peak", the fare is 6.25 o If the zone is 2 or 3 and the ticket type is "peak, the fure is 10.25 If the zone is 2 or3 and the ticket type is "off-peak", the fure is 7.50. e If the zone is 4 and thc tickct type is "peak", the farc is 12.00 » If the zone is 4 and the ticket type is "off peak", the fare is 8.75 « If the zone is 5, 6, or 7 and the ticket type is 'peak", the fare is 13.50 。If the zone is 5, 6, or 7 and the ticket lype is 'olf-peak". Lhe fare is 9.75. If the zone is greater thun 8, return a negative number (since your calculator does not handle inputs thut high) A template program LTRR tran İt. py, s available on the of the function must match cxactly (clsc, the scripts cannot find it) n ei e grading scr t does not run the whole progra but nstend ests ou function se arate y un te s todete nu e com tress As such, ename A sample run: Enter the number of zonest Enter the ticket type (peak/ofr-peak: ofr-peak The fare i» 9.75 And another number of zoncs: 6 Enter the Enter tbe ticket type (peak orf-peak peak The fare is 13.5 Hint: See Lah s