Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.63 KB

README.md

File metadata and controls

52 lines (38 loc) · 1.63 KB

Simple Calculator

A basic calculator with command-line interface written in Python.

Table of Contents

Introduction

This is a simple calculator program written in Python that allows users to perform basic arithmetic operations. It provides a command-line interface for users to input their calculations.

Features

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Exponentiation
  • Modulus
  • View Calculation History

Usage

  1. Run the calculator script in your Python environment.
  2. Choose the desired operation from the menu.
  3. Enter the required numbers when prompted.
  4. View the result and choose whether to continue or terminate.

Supported Operations

  • Addition (+): Add two numbers.
  • Subtraction (-): Subtract the second number from the first.
  • Multiplication (*): Multiply two numbers.
  • Division (/): Divide the first number by the second. Note: Division by zero is handled.
  • Exponentiation (^): Raise the first number to the power of the second.
  • Modulus (%): Calculate the remainder of the division of the first number by the second.
  • Terminate (#): Exit the calculator.
  • Reset ($): Reset the calculator for a new set of calculations.
  • History (?): View past calculations.

History

The calculator keeps track of previous calculations. You can view the calculation history by choosing the '?' option from the menu.

License

This project is licensed under the MIT License - see the LICENSE file for details.