Skip to content

Instantly share code, notes, and snippets.

@gilrg18
Created March 3, 2015 01:17
Show Gist options
  • Save gilrg18/ae9c7f2eec507bd2ffa4 to your computer and use it in GitHub Desktop.
Save gilrg18/ae9c7f2eec507bd2ffa4 to your computer and use it in GitHub Desktop.
wsq03.py
num1 = int(input("Give me a number: ")) #Asks the user for a number
num2 = int(input ("Give me another number: ")) #Asks the user for another number
suma = num1+num2 #this is the variable for the sum of two numbers
resta= num1-num2 #this is the variable for the difference of two numbers
multi= num1*num2 #this ios the variable for the product of two numbers
div=num1/num2 #this is the variable for the division of two numbers
rem= num1%num2 #this is the variable for the remainder of the division of two numbers
print ("The sum of your numbers is", suma) #Shows the user the result of the sum
print ("The difference of your numbers is", resta) #Shows the user the result of the difference
print ("The product of your numbers is", multi) #Shows the user the result of the product
print ("The division of your numbers is", int(div)) #Shows the user the result of the division
print("The remainder of the division of your numbers is", int(rem)) #Shows the user the remainder of the division
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment