Converts Infix to Postfix and vice versa...
Project description
An application to convert infix to postfix and vice versa...
Key Features
- Runs standalone
- Converts Infix expression to postfix expression.
- Converts postfix expression to infix expression.
Basic Requirements (Pre-installed)
- Python 3.x
- Windows OS or MacOS or Other Linux Distribution.
Installation
- Open terminal/cmd in windows/macos respectively.
- Run the command
pip install infix-postfix
.
Usage
- To convert infix to postfix, run
infix-postfix --infix "${infix_expression}"
- To convert postfix to infix, run
infix-postfix --postfix "${postfix_expression}"
NOTE : Double quotes ("") is must for writing the expression to get correct output..
How to write expressions?
- INFIX expression
- Correct Methods
- "( A+B)* C/D"
- "((A+B)*C/D+E^F)/G"
- "20.1 + (5 ^ 2 / 2)"
- "20.1 + ( 5 ^ 2 / 2)"
- etc...
- POSTFIX ecpression
- Correct Methods
- "A B + C * D /"
- "A B C D + E F + * G / + * H *"
- "20.1 5 +"
- Wrong Methods
- "AB+C*D/"
- "ABCD+EF+*G/+*H*"
- "20.1 5+"
- "20 5+"
- In One line, You have to give spaces after every value
- To run this application in your own application or python script, run
from infix_postfix.infix_postfix import infix,postfix
$(variable) = $(infix/postfix){expression}
print($(variable))
Example :-
Contribution
Anyone is free to contribute to this open source project. 🎉🎉
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
infix-postfix-1.2.0.tar.gz
(4.2 kB
view details)
Built Distribution
File details
Details for the file infix-postfix-1.2.0.tar.gz
.
File metadata
- Download URL: infix-postfix-1.2.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f285f282237c4f83d399c80f1c38eff9c4df0d27349fb67c837d0f7f6eb58fde |
|
MD5 | 0cf830ae898db502729178713df2c5fa |
|
BLAKE2b-256 | 9186d3341263cc291476de5a3a1bb84c014cb515c7a822ccc7706b0db81a5a1a |
File details
Details for the file infix_postfix-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: infix_postfix-1.2.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a08c0ff61f93910be83c8f4b32047d7a5d356ef0c1d4621056a18ae653bf8f8 |
|
MD5 | cb284c3431dce83f18047cc6affe5e46 |
|
BLAKE2b-256 | 6fcb9ffac2b12d65b22713723614be0dad5d825248ab34d1a7fd3574ab8f392a |