Skip to content

Instantly share code, notes, and snippets.

@brandon22esquivel
Created September 7, 2019 21:11
Show Gist options
  • Save brandon22esquivel/2aa3f24c70b232a2e91c3aa4173b839e to your computer and use it in GitHub Desktop.
Save brandon22esquivel/2aa3f24c70b232a2e91c3aa4173b839e to your computer and use it in GitHub Desktop.
# Con Metodo Numero def Numero
def Numero (num):
if num > 0:
return "Es positivo"
elif num < 0:
return "Es Negativo"
elif num == 0:
return "Es Cero"
num=input("Dame el numero:")
print(Numero(num))
#Sin metodo
"""print "Dame un valor:"
a = int(input(""))
if a > 0:
print "Es Positivo"
elif a == 0:
print "Es Cero"
else:
print "Es Negativo"
"""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment