Bus Route Profit - Python Problem Solution

Bus Route Profit

Python Problem Solution

Image by Henrik Nørby Langvang from Pixabay

PROBLEM STATEMENT

The Road Transport Corporation (RTC) of a city wants to know whether a particular bus route is running on profit or loss. Assume that the following information is given:


  • Price per Litre of fuel = 70
  • Milage of the bus in km/litre of fuel = 10
  • Price (Rs) per Ticket = 80
The bus runs on multiple routes having different distance in kms and number of passengers.

Write a Python program to calculate and return the profit earned (Rs) in each Route. 
Return -1 in case of loss. 


SOLUTION


SHARE If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
Newer Posts Newer Posts Older Posts Older Posts

More posts

Comments

Post a Comment

Sponsored Content