Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Simple Python Calculator

This is a basic command-line calculator program written in Python. It's a straightforward tool that allows users to perform fundamental arithmetic operations: addition, subtraction, multiplication, and division. The code is simple, easy to understand, and suitable for beginners learning Python.


Features

  • Addition (+): Adds two numbers.
  • Subtraction (-): Subtracts the second number from the first.
  • Multiplication (*): Multiplies two numbers.
  • Division (/): Divides the first number by the second. Includes a check to prevent division by zero.
  • User-Friendly Interface: Provides a simple menu for selecting an operation.
  • Input Validation: Handles non-numeric input gracefully with an error message.
  • Continuous Calculations: Allows the user to perform multiple calculations in a single session.

How to Run

  1. Prerequisites: Ensure you have Python 3 installed on your system.
  2. Clone the Repository:
    git clone [https://github.com/YourUsername/your-repository-name.git](https://github.com/YourUsername/your-repository-name.git)
    cd your-repository-name
    (Replace YourUsername and your-repository-name with your actual GitHub details.)
  3. Run the script:
    python calculator.py

Usage

  1. Start the program by running the calculator.py file.
  2. A menu will appear asking you to select an operation (1-4).
  3. Enter your choice and press Enter.
  4. The program will then prompt you to enter the first and second numbers.
  5. After the result is displayed, you will be asked if you want to perform another calculation.
  6. Type yes to continue or no to exit the program.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages