#python #tutorial #code
operator = input("Enter an operator (+ - * /): ")
num1 = float(input("Enter the 1st number: "))
num2 = float(input("Enter the 2nd number: "))
if operator == "+":
result = num1 + num2
print(round(result, 3))
elif operator == "-":
result = num1 - num2
print(round(result, 3))
elif operator == "*":
result = num1 * num2
print(round(result, 3))
elif operator == "/":
result = num1 / num2
print(round(result, 3))
else:
print(f"{operator} is not a valid operator")
On this page of the site you can watch the video online Python calculator program 🧮 with a duration of hours minute second in good quality, which was uploaded by the user Bro Code 17 October 2022, share the link with friends and acquaintances, this video has already been watched 242,675 times on youtube and it was liked by 4 thousand viewers. Enjoy your viewing!