Skip to content

ojoaox/python_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Python Calculator

This code implements a simple calculator in Python that allows the user to perform basic mathematical operations: addition, subtraction, multiplication, division, and exponentiation. The calculator operates in a loop that continues until the user chooses to exit.

How it works:

• The program prompts the user to input two numbers.

• Then it asks which operation to perform: addition (+), subtraction (-), multiplication (*), division (/), or exponentiation (**).

• The program attempts to convert the input values ​​to floating point numbers. If the conversion fails, it displays an error message.

• Depending on the operation chosen, the result is calculated and displayed.

• The user is asked if he wants to perform another operation. If he answers "no", the loop is interrupted and the program ends; otherwise, the loop starts again.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages