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.0.4.tar.gz (2.1 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.0.4-py2.py3-none-any.whl (2.8 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for sarunasncalculator-0.0.4.tar.gz
Algorithm Hash digest
SHA256 c5d41fbb92b7e3260564d12d2b37d49117da1649a6c58c7e516450ed8f9f99df
MD5 8f16c3e12ac4379eab0ec44613c9f7dc
BLAKE2b-256 a7a87c1b13f4e1b216d65b2df50aaab1ab731d2cea7092e78e320b3815de6693

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sarunasncalculator-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2cd4cb78ec81b2dc0386985c2d75a587037a849ad77d7752b6b6576b3b70266f
MD5 04a51c0ab135dd3ac1c785add95c3140
BLAKE2b-256 cf144810588f6cc22cddf9570f2835d102b4fe0c94842ca347b58aab8957527b

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