May-31-2020, 02:11 PM
print('hello there') print('what is your name?') while True: myName = input() try: if str(myName) == True: print('your name is ' + myName + ', it is nice to meet you') print('the length of your name is composed of ' + str(len(myName)) + ' letters.') else: print('Please use the alphabet instead of the number') continue print('what is your age?') while True: myAge = input() try: myAge = int(myAge) print('thank you') except ValueError: print(f"{myAge} isn't a number. Please enter a number!") pass except: print('thank you') print('you will be ' + str(int(myAge) + 1) + ' next year') print('this is the end of this program')it works but it ends first loop and print wrong sentences and don't ask second question also...
Output:hello there
[b]what is your name?[/b]
Samuel
[b]Please use the alphabet instead of the number[/b]