Skip to content

Latest commit

 

History

History
20 lines (20 loc) · 524 Bytes

File metadata and controls

20 lines (20 loc) · 524 Bytes

pythonlearnin

Python learning on a public computer

class Kocka: def init(self, jmeno): self.jmeno = jmeno def zamnoukej(self): print("{} Mnau".format(self.jmeno)) def zivoty(self, zivot): self.zivot = zivot zivot = 9 - self.uber if zivot is <0: print("Kočka je mrtvá") if zivot is >9: print("Nelze mít více než 9 životů") def uber_zivot(self, uber) self.uber = uber jmeno.uber_zivot() def je_ziva(self): micka = Kocka('Micka') micka.zamnoukej()