Draw a flowchart and construct a python program to A taxi driver charges the bill as follows. On a fine day, Mr. Roy travels to his office by taxi. Write a Python program to accept the kilometers traveled by Mr. Roy and calculate his taxi bill.
first 10 km rs 15/km
next 90 km rs 8/km
after that rs 6/km
distance = float(input("Enter kilometers travelled: "))
if distance <= 10:
bill = distance * 15
print("Total bill is", bill, 'USD')
elif distance <= 90:
bill_1 = distance * 8
print("The total bill is", bill_1, 'USD')
elif distance > 90:
bill_2 = distance * 6
print("The total bill is", bill_2, 'USD')
#This code contributed by S-U
Comments
Leave a comment