Created
February 25, 2014 23:48
-
-
Save elpargo/9220468 to your computer and use it in GitHub Desktop.
simple print example
This file contains 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
print("Es par o impar") | |
numero = int(raw_input("introducir un numero")) #utiliza raw_input, ya que input puede traer codigo ejecutable http://stackoverflow.com/questions/3800846/differences-between-input-and-raw-input | |
if numero%2: #en python el if evalua directo so == 0 es inneesario | |
print ("El numero ingresado es par") #usa los parentesis simple, ya que en py3 no son opcionales | |
else: | |
print ("El numero ingresado es impar") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment