A simple calculator package for the command line
Project description
dev_calc
dev_calc is a command-line calculator inspired by the Windows Developer Calculator. It provides advanced mathematical functions and is designed for developers who prefer using the terminal for calculations.
Features
Basic arithmetic operations: addition, subtraction, multiplication, and division Programmer mode: binary, hexadecimal, and octal calculations History of calculations Easy-to-use command-line interface Installation Install dev_calc using pip:
pip install dev_calc
Usage To use dev_calc, simply call it from your terminal:
dev_calc
Keybindings
q: Quit the application
k: Switch to the previous mode (DEC, BIN, HEX, OCT)
j: Switch to the next mode (DEC, BIN, HEX, OCT)
c: Clear the current input
Backspace: Delete the last character
Enter: Solve the current expression
Examples
Basic arithmetic:
Start the calculator: dev_calc Enter the expression 3 + 4 in DEC mode and press Enter.
[DEC]: 3 + 4
BIN: 0011 + 0100
HEX: 3 + 4
OCT: 3 + 4
--------------------
q: quit, k: previous, j: next, c: clear
[DEC]: 7
BIN: 0111
HEX: 7
OCT: 7
--------------------
q: quit, k: previous, j: next, c: clear
Switching modes:
DEC: Decimal (base 10)
BIN: Binary (base 2)
HEX: Hexadecimal (base 16)
OCT: Octal (base 8)
You can switch between these modes using the k and j keys.
Debug Mode
To run dev_calc in debug mode, use the -d flag:
dev_calc -d This will print debug information to the terminal.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes.
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 dev_calc-1.0.0.tar.gz
.
File metadata
- Download URL: dev_calc-1.0.0.tar.gz
- Upload date:
- Size: 42.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bc89a09a11484799df941d1d7cc0651aacaa84a6a45c8aab64a44495c621e1b |
|
MD5 | a16406527be132420c0bf37528ed5d6d |
|
BLAKE2b-256 | 5ca40f391e331b01102734fb9833247a2633cfab3a17edfbd8ab7d33be3b8b29 |
File details
Details for the file dev_calc-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: dev_calc-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d404eaa68035da53bbfd955cb9d7d5e4e8b87b9522a05bcb1c2195615bdd5214 |
|
MD5 | 69c2572e09c927de5e90eafd122f8f25 |
|
BLAKE2b-256 | 970fe5c1ff83ddc40c3d1df318d45ec4649d3c88c54c9e61febc52df77de81c0 |