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 -i https://test.pypi.org/simple/ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file LydiaMFcalc-0.0.1.tar.gz
.
File metadata
- Download URL: LydiaMFcalc-0.0.1.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39e5039c698bf488af570cacf78a715dcb092ad9b5c6cdca6278dfacd85fc609 |
|
MD5 | beef2c4e696061afae5d22ae76c66442 |
|
BLAKE2b-256 | df06939f05926f8e41cdad0ddccfa7133621004c5ac55e489bf5979bc80ac8a5 |
File details
Details for the file lydiamfcalc-0.0.1-py2.py3-none-any.whl
.
File metadata
- Download URL: lydiamfcalc-0.0.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a7ccd28264ba5651fae6e41cc10ea9147eb0e4ca6f6e693e7eddd55c7349551 |
|
MD5 | 2c9561fdc8290c495eb3ce48d9a221ba |
|
BLAKE2b-256 | 65b4a31a944ae0f42f283fa835522e62a195c0f853f8b57745d1de53f37ebc32 |