Student can't get if elif final statement to print for discussion post for python

Cheri Castro blueyes7175 at gmail.com
Sun Nov 19 13:10:22 EST 2017


I've tried several variations but haven't been able to figure out why my final if elif statement won't print. I tried using return, I tried using 1's and 0's rather than yes and no. Not sure what the issue is. Please, help. 
#This function will print how many yes answers the user has and a message
def correctAnswers(job, house, yard, time):
 if correctAnswers == 'yes':
 print ("Congratulations! You should get a puppy!")
 else:
 return "I'm sorry, you shouldn't get a puppy."


More information about the Python-list mailing list

AltStyle によって変換されたページ (->オリジナル) /