Class 01 - Arithmatic Operations
Class 01 - Arithmatic Operations
# INPUTTING VARIABLES
N1 = int(input("Enter first number"))
N2 = int(input('Enter second number'))
# CALCULATION
sumValue = N1 + N2
diffValue = N1 - N2
prodValue = N1 * N2
divValue = N1 / N2
modValue = N1 % N2
expValue = N1 ** N2
flrdiv = N1 // N2
# OUTPUT
print("ARITHMATIC OPERATIONS")
print("Sum of ", N1, " and ", N2, " is: \t", sumValue)
print("Diff of ", N1, " and ", N2, " is: \t", diffValue)
print("Product of ", N1, " and ", N2, " is: \t", prodValue)
print("Div of ", N1, " and ", N2, " is: \t", divValue)
print("Remainder of ", N1, " and ", N2, " is: \t", modValue)
print("Power of ", N1, " to ", N2, " is: \t", expValue)
print("Flr div of ", N1, " and ", N2, " is: \t", flrdiv)
OUTPUT
Enter first number
34
Enter second number
45
ARITHMATIC OPERATIONS
Sum of 34 and 45 is: 79
Diff of 34 and 45 is: -11
Product of 34 and 45 is: 1530
Div of 34 and 45 is: 0.7555555555555555
Remainder of 34 and 45 is: 34
Power of 34 to 45 is:
825184889837725994971915471173621692744697928074424045623
011467853824
Flr div of 34 and 45 is: 0