-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmest.py
40 lines (32 loc) · 1.05 KB
/
mest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
class Person:
def __init__(self, name, nationality):
self.name = name
self.nationality = nationality
class EITs(Person):
def __init__(self, name, nationality, fun_fact):
super().__init__(name, nationality)
self.fun_fact = fun_fact
def fun_facts(self):
print(self.fun_fact)
class Fellows(Person):
def __init__(self, name, nationality, happiness_level):
super().__init__(name, nationality)
self.happiness_level = happiness_level
def eat(self):
self.happiness_level +=1
print(self.happiness_level)
def teach(self):
self.happiness_level -=1
print(self.happiness_level)
# def check_logic():
# while True:
# choice = input("Enter 1 to check for EITs or 2 to check for Fellows")
# if choice ==1:
name = input("Enter name:")
nationality = input("Enter country:")
happiness_level = 5
fun_fact = input("What'\s your fun fact? ")
fe = Fellows(name, nationality, happiness_level)
fe.teach()
eit = EITs(name, nationality, fun_fact)
eit.fun_facts()