Skip to main content

initialize LydiaMFcalc package

Reason this release was yanked:

deprecated

Project description

Welcome to Lydia's calculator!

Install and Import

You can install the LydiaMFcalc package with

python -m pip install LydiaMFcalc

Inside Python you can import the calculator module with

from LydiaMFcalc import Calc as c

General Use

For working in command line/script mode you can create an instance of the Calc(ulator) class in the Calc module by calling the class with a starting number for your calculations, e.g. 4.0.

a = c.Calc(4)

Operations with the next number, e.g. 9.6, can be called like this:

a.add_to(9.6)

The next operation is always based on the result of the previous operation, i.e. the calculator has a memory. The current result/memory value can be accessed by

a.result

The Calc module offers an interactive mode that can be started with e.g.

b = c.Interactive_Calc()
b.activate()

In this mode, you are asked to enter the numbers and the operations one after the other.

Operations

The Calc module supports the following mathematical operations which can be called in interactive mode by typing the operation sign (string) followed by an input request of the number to be applied and by the function name with the number to be applied in command line/script mode.

operation interactive mode class function
addition + add_to(number)
subtraction - subtract_by(number)
multiplication * multiply_by(number)
division / divide_by(number)
n-th root rt root_by(number)

Reset Calculator

It is possible to reset the calculator memory/first operand: During interactive mode, enter R instead of an operation and the operand is set to zero. In command line/script mode type

a.reset(optional_number)

to reset the operand to an given value or to zero if left blank.

Leave Interactive Mode

If you want to quit the interactive mode, enter Q instead of an operation.

_~ Have fun! ~_

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

LydiaMFcalc-0.0.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

lydiamfcalc-0.0.2-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file LydiaMFcalc-0.0.2.tar.gz.

File metadata

  • Download URL: LydiaMFcalc-0.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.28.1

File hashes

Hashes for LydiaMFcalc-0.0.2.tar.gz
Algorithm Hash digest
SHA256 411e141e965c26f3bf5f418427f131ab6fb9ab456966530545145e793dfafa30
MD5 f38faf4a3a3165ef2a4fb77c6ee2d2ef
BLAKE2b-256 2d059cbd4bb75ddb59e5a7c18c955fe71e23a01da8310b0092a45b0b46128e83

See more details on using hashes here.

File details

Details for the file lydiamfcalc-0.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for lydiamfcalc-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1f0524ce8da1b44982c95a39189c8ddb4d05f6eabbfe3f5030df17c6401bf464
MD5 ad04274db1c3095391bf4ed06da7a60a
BLAKE2b-256 598730f4cd7c09384dbf089f65d9347de36fcb72db43f912345384e78ab6d3d2

See more details on using hashes here.

Supported by

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