Skip to main content

1st sprint project Turing College Calculator

Project description

Calculator with running memory

Functions:

  • .add
  • .subtract
  • .multiply
  • .n_root
  • .get_current_result
  • .get_action_seq - returns action sequence as a string Example: 4 + 2 + 3 - 2 = 7
  • .reset_memory - resets running memory and action sequence

Installation

pip install sarunasncalculator

Usage

You can initialize calculator with any starting point you want.

from sarunasncalculator.calculator import Calculator
callc = Calculator(2)
callc.add(2) # running memory would be 4
callc.subtract(1) # running memory would be 3
print(callc.get_action_seq) # would return 2 + 2 - 1 = 3

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

sarunasncalculator-0.3.5.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

sarunasncalculator-0.3.5-py2.py3-none-any.whl (2.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file sarunasncalculator-0.3.5.tar.gz.

File metadata

  • Download URL: sarunasncalculator-0.3.5.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.24.0

File hashes

Hashes for sarunasncalculator-0.3.5.tar.gz
Algorithm Hash digest
SHA256 8cd0a0774097a4375c446d0b4de14a5d9dbfb9df3c91908ef9686e9fb63ec94b
MD5 815abbc7c216cf2c74510fd1a5e3fbdb
BLAKE2b-256 0aa02a1b0820e7fa02c241e990e0b784b0f5692b3607e235251b1f27f57057f3

See more details on using hashes here.

File details

Details for the file sarunasncalculator-0.3.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sarunasncalculator-0.3.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4e759b2cefe4d1f3a50cef6ef1ec2333dff21a199565250688d6fa3a1504581d
MD5 6e7e0b8b988553e71341fb447a7bd5e9
BLAKE2b-256 44c492c8b7820338c8d9c8c7b480d3c47c2d986c19bcac4fa34f716ff15a141b

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