Last active
August 29, 2015 14:20
-
-
Save Irvingutierrez/83cb62b98cd07497e511 to your computer and use it in GitHub Desktop.
WSQ03
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("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) |
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("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