In this HackerRank Python Arithmetic Operators problem solution, we have given two integers a and b. we need to print the sum, difference, and product of both numbers in the separated lines.

HackerRank Arithmetic Operators in python problem solution

HackerRank Arithmetic Operators in python problem solution

# Enter your code here. Read input from STDIN. Print output to STDOUT
a = int(raw_input())
b = int(raw_input())

print a + b
print a - b
print a * b

Problem solution in Python 3 programming.

if __name__ == '__main__':
    a = int(input())
    b = int(input())
    print(a+b)
    print(a-b)
    print(a*b)


Here in the above python program, we are using the input() functions to get the input of a and b variables from the user and then we are printing the addition, subtraction, and multiplication of a and b variables using the print() function on the output screen on the separated lines. you can even add your input lines of code, test out your code with my code, and then set the values as expected by the output.