Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Dog:
- def __init__(self, name, variation):
- self.name = name
- self.variation = variation
- self.bark()
- def sit(self):
- print(f"{self.name} sedang duduk santuy sambil nge-vape")
- def cry(self):
- print(f"{self.name} : hikz ... >.<")
- def bark(self):
- print(f"Woof Woof ....")
- def sleep(self):
- print(f"{self.name} ngantuk zzzZZZZZ")
- def eat(self):
- print(f"{self.name} lapar... *monch* *monch*")
- dog_1 = Dog('Willie', 'Kintamani')
- print(dog_1.name)
- dog_1.sit()
- dog_1.cry()
- dog_1.sleep()
- dog_1.eat()
- dog_2 = Dog('Bagus', 'Lokal')
- print(dog_2.name)
- dog_2.sit()
- dog_2.cry()
- dog_2.sleep()
- dog_2.eat()
Advertisement
Add Comment
Please, Sign In to add comment