You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
416 B
19 lines
416 B
3 years ago
|
#!/bin/python
|
||
|
|
||
|
###########################################################
|
||
|
|
||
|
class Mensch():
|
||
|
|
||
|
def __init__(self, name):
|
||
|
self.name = name
|
||
|
|
||
|
def sprechen(self, text):
|
||
|
print(f"Ich bin {self.name} und ich sage: {text}")
|
||
|
|
||
|
###########################################################
|
||
|
|
||
|
domi = Mensch("Dominik")
|
||
|
domi.sprechen("Du netter Kerl!")
|
||
|
|
||
|
phil = Mensch("Philip")
|
||
|
phil.sprechen("Du tolles Weib..")
|