Question: Write a code in python 3 for this question.Check to see if it is possible to travel on a bike for a trip of .

Write a code in python 3 for this question.Check to see if it is possible to travel on a bike for a trip of . Consider the following inputs in order. N- maximum fuel capacity of the bike(in litres)M- mileage of the bike(in Kmpl), D- Distance between each fuel station(in km). Find the minimum number of refueling required (including the initial fueling) to reach the destination. If the rider can reach the destination print 'yes' along with the number of refuels required. if not respond 'No'. Input format: The input string will contain comma separated values for maximum fuel capacity, mileage of the bike, and Distance between each fuel station in the same order. Output format: a space separated string in case of success ie.. 'yes' along with the number of refuels or No Sample Input: 13,40,500 sample output: Yes 2 Explanation: The rider can reach the destination with just 2 refuelsSample Input: 13,28,400 Sample Output: No Explanation: The rider will run out of fuel before reaching the next fuel station. So will not be able to reach the destination.#below line is used to take input for the program. Do not modify below line.inputstring=input()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!