This blog is about showing you how i made a programm that works kind of like a calculator. The task was to creat a programm in which we can input two integers and the display will show the addition, the sustraction, the multiplication, the division and the reminder of the division of the numbers.

calculator

For this, i give the instruction to the programm to ask the user for two integers and then to print each of the mathemathic operations.

The code is this:

#Jorge Fernando Saldaña Cabal
# A01350730
print (“Hey!, Do you want to make some math”)
print(“Lets make the basic operations: Addition, Sustraction, Multiplication and”)
print(“Division”)
print()
x = int(input(“Please enter your firste integer: “))
print()
y = int(input(“Please enter your second integer: “))
add = x + y
sus = x – y
mul = x * y
div = x // y
rem = x % y
print ()
print(“The addition of your two numbers is: “, add, “, the sustracion is: “, sus, )
print(“the multiplication is: “, mul, “, the division is: “, div)
print(“and its reminder is: “, rem)
print (“Thanks for using us.”)

CC BY 4.0 Fun with numbers by fersabal is licensed under a Creative Commons Attribution 4.0 International License.