https://geek-university.com/python/the- ... tatements/
I followed it and created this code:
When I ran it, it can take lowercase y but not uppercase y. Also, when I enter numbers, it should print You have entered an invalid value but it didnt. Can anyone see whats wrong? I altered the code so many times but it cant function as I want it to be.
Code: Select all
try: start = str(input('Start? (y/n): ')) if start == (str('y') or str('Y')): print('you just started.') print('start = ' + start) else: print('you DID NOT start.') except: print ('You have entered an invalid value.')