Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class kelurahan():
- def __init__(self, name, nomor):
- self.__name = name
- self.__nomor = nomor
- def getname(self):
- return self.__name
- def getnomor(self):
- return self.__nomor
- def setNomor(self, pindah):
- self.__nomor += pindah
- warga = kelurahan("takdir", 50)
- print(warga.getname())
- print(warga.getnomor())
- warga.setNomor(10)
- print(warga.getnomor())
Advertisement
Add Comment
Please, Sign In to add comment