Calculator Program in python

Published: 30 September 2025
on channel: Logic Class for Geeks
156
5

Calculator in python #python
If else in python
Elif in python
Calculator in python
Input in python
While in python

while True:
num1 = float(input(“Enter first number: “))
operator = input(“Enter operator (+, -, *, /): “)
num2 = float(input(“Enter second number: “))

if operator == ‘+’:
result = num1 + num2
elif operator == ‘-‘:
result = num1 - num2
elif operator == ‘*’:
result = num1 * num2
elif operator == ‘/‘:
if num2 != 0:
result = num1 / num2
else:
result = “Error! Division by zero.”
print(“Result:”, result)

#codinglife #coding #programming #helloworld #dsa #algo #code #coder #logicclassforgeeks #programminglanguage #codingclass #learncoding #coding coding programming python calculator in python


On this page of the site you can watch the video online Calculator Program in python with a duration of hours minute second in good quality, which was uploaded by the user Logic Class for Geeks 30 September 2025, share the link with friends and acquaintances, this video has already been watched 156 times on youtube and it was liked by 5 viewers. Enjoy your viewing!