Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

Simple Calculator in Python

num1 = float(input("Enter first number: ")) num2 = float(input("Enter second number: "))

print("Choose operation: +, -, *, /") operation = input("Enter operation: ")

if operation == "+": print("Result:", num1 + num2)

elif operation == "-": print("Result:", num1 - num2)

elif operation == "*": print("Result:", num1 * num2)

elif operation == "/": if num2 != 0: print("Result:", num1 / num2) else: print("Cannot divide by zero")

else: print("Invalid operation")

About

A calculator is a basic tool used to perform simple mathematical operations. This one allows you to easily do

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors