Num Stack Arithmac
Install via:
pip install num-stack-arithmac
Pre-execution
Input is given by specifying the start number.
Instructions
Here are the different instructions:
+ increments the number.
- decrements the number.
% performs reduction modulo 2 on the number.
^ squares the number.
r takes the square root of the number.
p prints the decimal representation of the number.
q prints the character with the codepoint of the number.
b prints the binary representation of the number.
x prints the hexadecimal representation of the number.
o prints the boolean representation of the number.
< starts a comment. Comments are ignored by the compiler.
> ends a comment. Comments are ignored by the compiler.
s halts the programme.
All other characters are no-ops. If you use \\ or . in your programme, the compiler will incorrectly think you are specifying the file path if you are typing in raw code. You can also access a graphical editor by typing in g.
Example
Here is an example programme that checks whether a number is even or odd (the number is given by the starting value):
%+%o
Metadata
Release files for num-stack-arithmac 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| num_stack_arithmac-0.0.2.tar.gz | 3.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| num_stack_arithmac-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / num_stack_arithmac-0.0.2.tar.gz
| Download URL | num_stack_arithmac-0.0.2.tar.gz |
|---|---|
| Size | 3.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3ec2aab2cc0a7d852a97c6a406524365baa30666fd19083efa9dffb00f3b87c
|
|
BLAKE2b-256 checksum How to use checksums |
e1884b4cd6d85ddfeeb45827f8b8ddb8694ee7b84a806f947b0b9cc915006530
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|
Release files / num_stack_arithmac-0.0.2-py3-none-any.whl
| Download URL | num_stack_arithmac-0.0.2-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ac7653765106c9584f961e11a185fc24f5ea75a3d8b15608a0c7b9c9f65368d
|
|
BLAKE2b-256 checksum How to use checksums |
5e72d5afaa17b55b5a54cace817ff4cb9a9a33a1f8cba73e0f69f3d74bfbfd40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.11
|