Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Car :
- def __init__(self, eff) :
- self.eff = eff
- self.gas = 0
- def drive(self, km) :
- # @param km: int, chilometri percorsi
- self.gas = km/self.gas
- def getGas(self) :
- return self.gas
- def addGas(self, c) :
- # @param c: int, quantita' di carburante aggiunta
- self.gas = self.gas+c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement