27 Nov TCMS 18:30 Python Homework 11.22
Question:
You’re on a long car trip and arrive at a gas station. It’s 200 km to the next station. Write a program to figure out if you need to buy gas here, or if you can wait for the next station.
The program should ask these questions, Input Sample:
- How many gas in your fuel tank, in liters?
- How many km per liter does your car get?
The output should look something like this:
Output Sample 1:
gas in tank: 24
km per liter: 10
You can go another 240 km
The next gas station is 200 km away
You can wait for the next station.
Output Sample 2:
gas in tank: 12
km per liter: 10
You can go another 120 km
The next gas station is 200 km away
You have to buy gas here
Sorry, the comment form is closed at this time.