Skip to content

Instantly share code, notes, and snippets.

@Irvingutierrez
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Irvingutierrez/83cb62b98cd07497e511 to your computer and use it in GitHub Desktop.
Save Irvingutierrez/83cb62b98cd07497e511 to your computer and use it in GitHub Desktop.
WSQ03
print("Fun with numbers")
print()
x=int(input("Introduce un numero "))
y=int(input("Introduce otro numero "))
suma= x+y
res= x-y
mult= x*y
div= int(x/y)
mod= int(x%y)
print()
print("La suma de los numeros es ", suma)
print("La resta de los numeros es ", res)
print("La multiplicacion de los numeros es ", mult)
print("La division de los numeros es ", div)
print("El sobrante de los numeros es ", mod)
print("Fun with numbers")
print()
x=int(input("Introduce un numero "))
y=int(input("Introduce otro numero "))
def sum_num(a,b):
r=a+b
return r
def res_num(a,b):
r=a-b
return r
def mult_num(a,b):
r=a*b
return r
def div_num(a,b):
r=int(x/y)
return r
def mod_num(a,b):
r=int(x%y)
return r
suma= sum_num(x,y)
res= res_num(x,y)
mult= mult_num(x,y)
div= div_num(x,y)
mod= mod_num(x,y)
print()
print("La suma de los numeros es ", suma)
print("La resta de los numeros es ", res)
print("La multiplicacion de los numeros es ", mult)
print("La division de los numeros es ", div)
print("El sobrante de los numeros es ", mod)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment