I want to return the if statements if they equal the value of the dictionary and print the dictionary value not just use == 'HW' and print some text. Right Now I return nothing So I am wondering what I did wrong. How do I get out of the while loop when I give a wrong answer first and then a correct one?
from ex45f import live
class adult(live):
def __init__(self, choose):
self.choose = choose
def choices(self):
options = {
'HW': 'Hard Working',
'PA': 'Partying',
'DE': 'Doing everyting a bit',
}
#while choose != 'HW' or 'PA' or 'DE':
while not (self.choose == 'HW' or self.choose == 'PA' or self.choose == 'DE'):
x = input("""Choose again
> """)
print(x)
if self.choose == options['HW']:
return "You are going to be millionare"
elif self.choose == options['PA']:
return "You will have the first year a great life and then you will hate it"
elif self.choose == options['DE']:
return "Nothing intersting in life happens."
else:
return "Wrong input"
choose = input("""Choose one of those options: HW, PA, DE)
> """)
zw = adult(choose)
zw.choices()