Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
dumbwaysid_tes
class Biodata:
#"""docstring for Biodata."""
nama = ""
tanggal_lahir = ""
alamat = ""
sekolah = ""
pekerjaan = ""
hobi = ""
skill = ""
cita2 = ""
def __init__(self, nama):
#print("ini adalah constructor")
self.nama = nama
self.tanggal_lahir = "1 juni 1991"
self.alamat = "JL. Raya Cermee RT 14 Desa Cermee, Kec. Cermee, Kab. Bondowoso, JATIM"
self.sekolah = "Universitas Jember"
self.pekerjaan = "wiraswasta"
def set_hobi(self,hobi):
self.hobi=hobi
def set_skill(self,skill):
self.skill=skill
def set_cita2(self,cita2):
self.cita2=cita2
p = Biodata("tutik utari")
p.set_hobi("membaca,menulis,memasak,yoga")
p.set_skill("masak,mendengarkan,kerapian lingkungan,costumer service")
p.set_cita2("tekhnopreneur")
print ("nama : %s \n tanggal lahir : %s \n alamat : %s \n sekolah : %s \n pekerjaan : %s \n hobi : %s \n skill : %s \n cita-cita : %s" % (p.nama,p.tanggal_lahir,p.alamat,p.sekolah,p.pekerjaan,p.hobi,p.skill,p.cita2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.