while True: answer = input('enter age:') if answer == 'stop': break try: print(float(answer) ** 2) except: print('Bad!') print('bye') """ while True: answer = input('enter age:') if answer == 'stop': break if not answer.isdigit(): print('Bad!') else: print(int(answer) ** 2) print('bye') """