Created
April 23, 2018 20:45
-
-
Save jO-Osko/d1bc5c833db874ce74432e3dba8e633b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person: | |
def __init__(self, first_name, last_name, email, | |
phone_number="010101"): | |
self.first_name = first_name | |
self.last_name = last_name | |
self.email = email | |
self.phone_number = phone_number | |
def polno_ime(self): | |
return self.first_name + " " + self.last_name | |
def izpisi_vse_podatke(self): | |
print(person.polno_ime() + ":") | |
print(person.phone_number) | |
print(person.email) | |
print("Konec podatkov o osebi: " + person.polno_ime()) | |
def poklici(self, naslovnik): | |
print(self.polno_ime() + "klice: " + naslovnik.polno_ime()) | |
def neki(self): | |
pass | |
miha = Person("Miha", "Novak", "[email protected]") | |
miha2 = Person("Miha2", "Novak2", "[email protected]", "123456") | |
miha3 = Person("Miha3", "Novak3", "[email protected]", "0234263472") | |
miha.poklici(miha2) | |
imenik = [miha, miha2, miha3] | |
print("Dobrodosel v imeniku") | |
for person in imenik: | |
person.izpisi_vse_podatke() | |
print("-----------------------") | |
print("Konec imenika") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment