Enough Fuel

Before reaching a gas station, it is useful to know whether the fuel left in the tank is enough. Write a function zero_fuel that takes the distance distance_to_pump, the car’s range in kilometers per litre mpg, and the remaining fuel fuel_left. Return True if the car can reach the pump, otherwise return False.

Примеры

Ввод
50, 25, 2
Вывод
True
Ввод
100, 50, 1
Вывод
False
Ввод
100, 50, 3
Вывод
True

Нужно реализовать

def zero_fuel(distance_to_pump: int, mpg: int, fuel_left: int) -> bool:

Теги

math
PostgreSQLv16

Ovdje će se prikazati rezultat izvršavanja koda

Visible tests
1
Input
50, 25, 2
ExpectedTrue
2
Input
100, 50, 1
ExpectedFalse
3
Input
100, 50, 3
ExpectedTrue
4
Input
20, 5, 3
ExpectedFalse
5
Input
0, 1, 0
ExpectedTrue
6
Input
0, 1, -1
ExpectedFalse
Focus radio
Paused · SomaFM · Fluid