Skip to content

Instantly share code, notes, and snippets.

@samverneck
Created January 11, 2017 00:31
Show Gist options
  • Save samverneck/4ab33a301eb9cdb00fea61a1d8e3f013 to your computer and use it in GitHub Desktop.
Save samverneck/4ab33a301eb9cdb00fea61a1d8e3f013 to your computer and use it in GitHub Desktop.
numero = int(input("Digite um número inteiro: "))
digitoDezena = 0 if (numero < 10) else (numero // 10 % 10)
print("O dígito das dezenas é", digitoDezena)
@samverneck
Copy link
Author

numero = int(input("Digite um número inteiro: "))
digitoDezena = 0 if (numero < 10) else (numero % 10 // 10)
print("O dígito das dezenas é", digitoDezena)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment