Posts by Victor Hugo • 1 point
1 post
-
0
votes0
answers71
viewsQ: How to make a function with Python data validation? type Try
When I do this code outside a function it works, now when I do with function it returns me 0. ``` def validacao(x): try: x = int(input()) band = 1 except ValueError: band = 0 while band==0:…
pythonasked Victor Hugo 1