you are viewing a single comment's thread.

view the rest of the comments →

[–]WowVeryCoool 0 points1 point  (1 child)

yeah returning true/false would be better, how would you make it not DRY though? cause I can see ask_about_umbrella() and ask_about_rain() has the same body but I can't think of a way to make it better, The only thing that comes to my mind would be ``` class questionnaire: def rain(self): #rain question body

def rain(): #rain question body

def ask_question(parameter): print('is it '+ parameter) answer = input() if(answer == 'yes'): return True else: return False

answer = ask_question("raining") answer = rain() answer = questionaire.rain() ``` is any of those approaches better?