Skip to main content

basic boolean calculator

Project description

This is boolean calculator with operate from left to right.

#—————————# Develop by PAO,RAM and YN #—————————#

Example

import boolcalc

inp = “T ^ T <–> ( T –> F v ( T ^ T ) )”.split(” “); print(boolcalc.calculate(inp));

inp = “( ( ( T –> F –> T v F ) <–> T ) ^ T )”.split(” “); print(boolcalc.calculate(inp));

inp = “( ( ( T –> F –> T v F ) <–> T ) ^ T() “.split(” “); print(boolcalc.calculate(inp));

inp = [“(“,”T”,”<–>”,”F”,”^”,”F”,”)”]; print(boolcalc.calculate(inp));

This library use expression tree data structure to operate the postfix of boolean term.

To convert infix to postfix, use the stack data stucture.

The mentioned datastructure we implement by ourselves.

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

boolcalc-0.0.8.tar.gz (3.5 kB view hashes)

Uploaded Source

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