Created
March 23, 2020 18:03
-
-
Save steffanydev/cf21676c5c5593f98353fbf2ff61f71c to your computer and use it in GitHub Desktop.
Crie um programa que leia um número inteiro e mostre na tela se ele é PAR ou ÍMPAR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| numero = int(input('Digite um número: ')) | |
| # Resto da divisão por 2 | |
| resultado = numero % 2 | |
| if resultado == 0: | |
| print('{} é PAR'.format(numero)) | |
| else: | |
| print('{} é ÍMPAR'.format(numero)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment