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 details)

Uploaded Source

File details

Details for the file boolcalc-0.0.8.tar.gz.

File metadata

  • Download URL: boolcalc-0.0.8.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for boolcalc-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a030f95b688c530c2945e81ad678a5b8d893f7040af925beb02cdc520b678a08
MD5 cda550f12be278c207581fb6da4729d6
BLAKE2b-256 ed2b7998eca0303f25a3945ed38cd5c66a21912f082ec03750a69686539d9583

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page