Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. #USO DE METODOS CON IF == Edad uso if 1, uso if 2 y numposneg uso if 3
  2. def Numero (num):
  3. if num > 0:
  4. return "Es positivo"
  5. elif num < 0:
  6. return "Es negativo"
  7. elif num == 0:
  8. return "Es un cero"
  9.  
  10. num = input("Dame el numero:")
  11. print(Numero(num))
  12.  
  13.  
  14.  
  15. """ print "Dame el valor"
  16. a = int(input(""))
  17.  
  18. if a > 0:
  19. print "Es un numero positivo"
  20.  
  21. elif a == 0:
  22. print "El numero es cero"
  23.  
  24. else:
  25. print "Es numero negativo" """
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement