Last active
August 21, 2016 21:07
-
-
Save Spotik/3f715f056bdfda522bf5177079683fbe to your computer and use it in GitHub Desktop.
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
'''Escreva um algoritmo que leia um número inteiro do teclado e diga se esse número é par ou ímpar.''' | |
numero = input("Insira um número: ") | |
im_par = numero % 2 | |
if im_par == 0: | |
print "O número %d é par" %(numero) | |
else: | |
print "O número %d é impar" % (numero) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment