2 min read
Here’s my code for the #WSQ03, i used these links as a reference to help me deal with this task: http:/
http:/
I have put some comments in the code to explain what each line does.
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
#TC1014 #WSQ03 by Gilberto Rogel García is licensed under a Creative Commons Attribution 4.0 International License.