Skip to content

Instantly share code, notes, and snippets.

@ramalho
Created March 6, 2019 22:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramalho/f6fc95042b09d946402fbb06e3538d7f to your computer and use it in GitHub Desktop.
Save ramalho/f6fc95042b09d946402fbb06e3538d7f to your computer and use it in GitHub Desktop.
Resposta entre dois valores
resposta = -1
while resposta < 0 or resposta > 150:
try:
resposta = int(input('Digite um valor entre 0 e 150: '))
except ValueError:
continue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment