Posts by Vincenslau • 61 points
1 post
-
4
votes3
answers329
viewsQ: Why does my "Try" in Python not work?
x = int(input("Por favor, insira um número: ")) try: print(x != int) except ValueError: print("Somente números.") The mistake that gives is: ValueError: invalid literal for int() with base 10: 'x' I…