Skip to content

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

License

Notifications You must be signed in to change notification settings

OshanEranga/simple_calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages