Create a program that will accept number of passengers and distance from point of origin to destination. Calculate the expense of the passenger if the fare is P20.00 per kilometer. The image is the sample output. Attach the screenshot of your code.
Passenger count: 5
Distance: 2
Total fare is : (peso sign) 200.00
# -*- coding: utf-8 -*-
sign_peso = u'\u20b1'
count = int(input('Passenger count:'))
dist = float(input('Distance: '))
print(f'Total fare is : {sign_peso} {count*dist}')
test run program screen and text program screen
Comments
Leave a comment