Question: This is my code as currently constituted. Here are the rules of getting a total charge: Vehicles are charged a rate of 33.95 cents per

This is my code as currently constituted.
Here are the rules of getting a total charge:
Vehicles are charged a rate of 33.95 cents per mile.
Vehicles with more than two axles are charged at an additional rate of 44.95 cents per additional axle per mile. The number of axles for a vehicle includes any trailers they may be towing.
There is a surcharge of 27% to travel in Zone 2
Additionally, This function takes three arguments: a float representing the entry marker, a float representing the exit marker, and an int representing the number of axles the vehicle has.
The function calculates the toll charge (based on the distance traveled). This needs to consider
: You will want to test some different distances and some different number of axles to be sure that the charges are correct.
Test whether the vehicle got charged the surcharge for traveling in Zone 2. This is trickier because a customer is charged the surcharge if they start or end in Zone 2, or go from Zone 1 to 3 or vice versa.
Can someone tell me how close I am, what I need to do, etc.
In PYTHON, can someone help me fix my function?
def determine_zone(marker): Should compute the zone. Enter a float representing a marker - and retu with an int with the correct marker (1,2,3). Get the correct zone based on mileage provided"" if marker >- 0 and marker20: elif marker20.1 and marker -0 and exitmarker 20: if entrymarker >-0 and exitmarker 20 and axel-2: if entrymarker > 20.1 and exitmarker40: if entrymarker >-20.1 and exitmarker 40 and axel >-2: if entrymarker-40.1 and exitmarker60: if entrymarker -40.1 and exitmarker60 and axel >- 2: print(Cexitmarker - entrymaker) 33.951.25) print(Cexitmarker - entrymaker) 33.95+ 1.25 + 44.95) print(Cexitmarker - entrymaker) 33.95* 27/100 1.25) print(Cexitmarker - entrymaker) 33.95 * 27/100 +44.95 1.25) print(Cexitmarker - entrymaker) 33.951.25) print Cexitmarker - entrymake33.951.25 44.950 #Vehicles are charged a rate of 33.95 cents per mile Vehicles with more than two axles are charged at an additional rate of 44.95 cents per additional #There is a surcharge of 27% to travel in Zone 2. #customers are charged a basic highway entrance fee of $1.25 per trip def determine_zone(marker): Should compute the zone. Enter a float representing a marker - and retu with an int with the correct marker (1,2,3). Get the correct zone based on mileage provided"" if marker >- 0 and marker20: elif marker20.1 and marker -0 and exitmarker 20: if entrymarker >-0 and exitmarker 20 and axel-2: if entrymarker > 20.1 and exitmarker40: if entrymarker >-20.1 and exitmarker 40 and axel >-2: if entrymarker-40.1 and exitmarker60: if entrymarker -40.1 and exitmarker60 and axel >- 2: print(Cexitmarker - entrymaker) 33.951.25) print(Cexitmarker - entrymaker) 33.95+ 1.25 + 44.95) print(Cexitmarker - entrymaker) 33.95* 27/100 1.25) print(Cexitmarker - entrymaker) 33.95 * 27/100 +44.95 1.25) print(Cexitmarker - entrymaker) 33.951.25) print Cexitmarker - entrymake33.951.25 44.950 #Vehicles are charged a rate of 33.95 cents per mile Vehicles with more than two axles are charged at an additional rate of 44.95 cents per additional #There is a surcharge of 27% to travel in Zone 2. #customers are charged a basic highway entrance fee of $1.25 per trip
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
