Skip to content

Instantly share code, notes, and snippets.

@steffanydev
Created March 23, 2020 18:03
Show Gist options
  • Select an option

  • Save steffanydev/cf21676c5c5593f98353fbf2ff61f71c to your computer and use it in GitHub Desktop.

Select an option

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.
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