Skip to main content

A simple calculator package

Project description

Simple Python Math Calculator

This package is a simple math calculator. It has basic operations such as addition, subtraction, multiplication, and division. Additionally, it also has the ability to find the nth root. This calculator will store all values computed until the memory is reset.

Installation

Installing tcCalc3 with pip

pip install tcCalc3

Features

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • nth Root

Methods

.memory() - Return the current value stored in the calculator's memory

.add(num)- Add value to the calculator's current value.

.subtract(num) - Subtract value from the calculator's current value.

.multiply(num) - Multiply value of the calculator's current value.

.divide(num) - Divide value of the calculator's current value.

.nroot(num, n) - Calculate the nth root of a number.

.reset() - Reset the calculators value in memory back to zero.

Usage

from tcCalc.calculator import Calculator

# Initialize instance
calculator = Calculator()

# Calling the methods

>>> calculator.add(10)
10

>>> calculator.subtract(3)
7

>>> calculator.multiply(3)
21

>>> calculator.divide(3)
7

>>> calculator.nroot(81,2)
9

>>> calculator.memory()
7

>>> calculator.reset()
0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tcCalc3-0.0.4.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tcCalc3-0.0.4-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file tcCalc3-0.0.4.tar.gz.

File metadata

  • Download URL: tcCalc3-0.0.4.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for tcCalc3-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6fd0627141aa0ef7681b3c948ce00671fdd43460f9bf6a5de2f5ccf026f6f491
MD5 ce0907fd7aa151fb94073f86590d71e7
BLAKE2b-256 36f18c696294793322721cc4e61dbee1bdf9b3f9cc475c7ac2463a8cbc66d973

See more details on using hashes here.

File details

Details for the file tcCalc3-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: tcCalc3-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for tcCalc3-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7088c6dbf365903336b17306091023b23373c9ac7e4c023e2ae8a02a880a4742
MD5 24fad09fa11597840474a5f96fac2d27
BLAKE2b-256 c5b9056faba403c1c522003cb2bd2b45da93ba2c897dfac61389678b43e5b1f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page