Skip to main content

Simple calculator

Project description

Simple calculator


Usage in code

from xtcalc import tool

# Add 5 + 34
a1 = xt.add(5, 34)

# Subtract 12 - 5
a2 = xt.subtract(12, 5)

# Divide 15 / 5
a3 = xt.divide(15, 5)

# Multiply 45 * 23
a4 = xt.multiply(45, 23)

# A random number, for example from 1 to 50
a5 = xt.rnd(1,50)

print(a1, a2, a3, a4, a5)

Syntax and description

Syntax Description Example
add Add 5 + 34 xt.add(5, 34)
subtract Subtract 12 - 5 xt.subtract(12, 5)
divide Divide 15 / 5 xt.divide(15, 5)
multiply Multiply 45 * 23 xt.multiply(45, 23)
rnd Random from 1 to 50 xt.rnd(1, 50)

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

xtcalc-1.2.1.tar.gz (1.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xtcalc-1.2.1-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file xtcalc-1.2.1.tar.gz.

File metadata

  • Download URL: xtcalc-1.2.1.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for xtcalc-1.2.1.tar.gz
Algorithm Hash digest
SHA256 859913cbf8bec2d96a34163d30d16810fc9739ff45d4ee86fea8dcc67d1638bf
MD5 e1087e4a94d8120441b14f604b5fe106
BLAKE2b-256 fefad34337e601abb33ed7d511de346172b9094024f8b1fe248471de18b412ab

See more details on using hashes here.

File details

Details for the file xtcalc-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: xtcalc-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for xtcalc-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b008669dfcf55bd1631e606545e253e6b9de7142799656b86e9cee5901ab43d4
MD5 f6e6cf56c9bdc724702b41ae5c36403d
BLAKE2b-256 e73b7da62f2130d893a4e048af12ee45e07bbf99b296174a1ed4bc98021751aa

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