Skip to content

The Terminal Python Calculator is a straightforward and interactive tool designed to perform basic arithmetic operations: addition, subtraction, multiplication, and division.

License

Notifications You must be signed in to change notification settings

spragginsdesigns/Python-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Terminal Python Calculator

Author: Austin Spraggins
Date: 11/09/2023
Version: 1.0

Purpose

The Terminal Python Calculator is a straightforward and interactive tool designed to perform basic arithmetic operations: addition, subtraction, multiplication, and division. It's user-friendly, ensuring ease of use for anyone familiar with basic terminal commands.

Features

  • Arithmetic Operations: Add, subtract, multiply, and divide two numbers.
  • Interactive User Input: Choose operations and input numbers interactively.
  • Input Validation: Ensures only numeric inputs are accepted.
  • Division by Zero Handling: Gracefully handles division by zero with an error message.

How to Use

  1. Prerequisite: Ensure Python is installed on your system.
  2. Get the Script: Download or clone the repository containing calculator.py.
  3. Run the Script:
    python calculator.py
  4. Follow Prompts: Choose an operation and input numbers as prompted.

Operations

  • Add: Sum two numbers.
  • Subtract: Subtract the second number from the first.
  • Multiply: Multiply two numbers together.
  • Divide: Divide the first number by the second (includes division by zero handling).

Exiting the Program

  • Type quit when prompted for an operation to exit the calculator.

Development

Developed to demonstrate fundamental programming concepts in Python, this calculator serves as a practical example of functions, loops, and error handling. It's a basic yet functional tool, ideal for those learning Python or needing a simple arithmetic calculator.

Future Enhancements

  • Additional Operations: Include advanced mathematical functions.
  • Graphical User Interface (GUI): Develop a GUI for an enriched user experience.
  • Enhanced Error Handling: Improve input validation and error responses.

This calculator is crafted for educational and demonstration purposes. Contributions, forks, and modifications for personal or educational use are welcome. For suggestions or enhancements, feel free to contribute to the repository.

About

The Terminal Python Calculator is a straightforward and interactive tool designed to perform basic arithmetic operations: addition, subtraction, multiplication, and division.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages