Enough Fuel to Arrive
Before heading to the next gas station, you need to know whether the car can make it on the fuel left. Write zero_fuel, which receives the distance to the pump distance_to_pump, the car's efficiency mpg in kilometers per litre, and the remaining fuel fuel_left. Return True if the fuel is enough to 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
Logáil isteach chun stair na n-aighneachtaí a fheiceáil
Logáil isteachLogáil isteach chun an Meantóir IS a úsáid
Logáil isteachVisible tests
1
Input
50, 25, 2Expected
True2
Input
100, 50, 1Expected
False3
Input
100, 50, 3Expected
True4
Input
10, 4, 3Expected
True5
Input
60, 30, 1Expected
False6
Input
100, 50, 999999Expected
TrueFocus radio
Paused · SomaFM · Fluid