diff --git a/Basics/17_class.py b/Basics/17_class.py index bc2194b1..2458c199 100644 --- a/Basics/17_class.py +++ b/Basics/17_class.py @@ -2,20 +2,16 @@ class Human: def __init__(self, n, o): self.name = n self.occupation = o - def do_work(self): if self.occupation == "tennis player": print(self.name, "plays tennis") elif self.occupation == "actor": print(self.name, "shoots film") - def speaks(self): print(self.name, "says how are you?") - tom = Human("tom cruise","actor") tom.do_work() tom.speaks() - maria = Human("maria sharapova","tennis player") maria.do_work() -maria.speaks() \ No newline at end of file +maria.speaks()