Open isalexlog opened 3 years ago
TASK 1
model
kmsPerLiter
tank
odometer
.fill(liters)
.drive(distance)
fuel
drive
TASK 1
model
andkmsPerLiter
from arguments.tank
at 0odometer
at 0.fill(liters)
method. Add the liters totank
..drive(distance)
. The distance driven:odometer
to go up.tank
to go down takingkmsPerLiter
into account.fuel
while driving can't drive any more distance:drive
method should return a string "I ran out of fuel at x kms!" x beingodometer
.