Skip to content

Calculator package made as an exercise in a Data Science course

License

Notifications You must be signed in to change notification settings

MaryJ25/Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Calculator

Table of Contents

  1. About The Project
  2. Installation
  3. Usage Example
  4. Available Functions
  5. License

About The Project

This is a simple Python Calculator package. The package was made as an exercise in a Data Science course taught by Turing College. The package allows simple calculations to be made.

Installation

To install use

pip install git+https://github.com/MaryJ25/Calculator.git

Then to import it use

from calculator.calculator import Calculator

Usage Example

c = Calculator()
c.start(10)
c.add(10)
c.divide(5)
c.get_current() #output 4

Available Functions

reset() - resets the value

start(10) - sets the value to 10

add(10) - adds 10 to current value

subtract(10) - subtracts 10 from current value

multiply(10) - multiplies current value by 10

divide(10) - divides current value by 10

power(10) - exponentiates current value to the 10th power

root(10) - gets the 10th root from current value

get_current() - returns current value

License

Distributed under the MIT License. See LICENSE for more information.

About

Calculator package made as an exercise in a Data Science course

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published