Advertisement
hackloper775

sumadef

Jan 24th, 2013
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. #!/usr/bin/env python3
  2.  
  3. numero1 = input("Escribe el numero uno: ")
  4. numero2 = input("Escribe el numero dos: ")
  5.  
  6. try:
  7.       int(numero1), int(numero2)
  8.            
  9. except:
  10.       print ('Numeros!!!')
  11.       exit()    
  12.  
  13. def operacion(n1,n2):
  14.         print ("Suma :", n1, "+", n2)
  15.         print ("Igual a:", int(n1) + int(n2))
  16.  
  17. operacion(numero1,numero2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement