Skip to content

Instantly share code, notes, and snippets.

@hinata4zzahra
Last active February 16, 2018 07:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hinata4zzahra/a913716db1aee25645afd7953cab0f46 to your computer and use it in GitHub Desktop.
Save hinata4zzahra/a913716db1aee25645afd7953cab0f46 to your computer and use it in GitHub Desktop.
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