Skip to main content

A simple calculator built in Python

Project description

Calculator

A simple Python calculator package that provides basic arithmetic operations such as addition, subtraction, multiplication, division, and power.

This package can be used both as a Python library and as a command-line tool.


Features

  • Addition of multiple numbers
  • Subtraction of two numbers
  • Multiplication of multiple numbers
  • Division
  • Power calculation
  • Remainder calculation
  • Simple and lightweight Python package

Installation

Install the package using pip:

pip install lakshaycalculator

Or install locally:

pip install .

Usage (Python)

You can import the functions directly in Python.

from lakshayCalculator.calculator import add, subtract, multiply, division, power

print(add(1,2,3,4))
print(subtract(10,5))
print(multiply(2,3,4))
print(division(10,2))
print(power(2,3))
print(remainder(3,2))

Output

10
5
24
5.0
8
1

Usage (CLI)

After installation, you can run the calculator from the terminal:

calculator

This command runs the main() function defined in the package.


Available Functions

add

Adds multiple numbers.

add(1,2,3)

subtract

Subtracts two numbers.

subtract(10,5)

multiply

Multiplies multiple numbers.

multiply(2,3,4)

division

Divides two numbers.

division(10,2)

power

Calculates power of a number.

power(2,3)

remainder

Calculates remainder of a number.

remainder(2,3)

Requirements

  • Python 3.8 or higher

Author

Lakshya Varshney Email: lakshyavarshney62@gmail.com


License

MIT License

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

lakshaycalculator-0.1.3.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

lakshaycalculator-0.1.3-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file lakshaycalculator-0.1.3.tar.gz.

File metadata

  • Download URL: lakshaycalculator-0.1.3.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for lakshaycalculator-0.1.3.tar.gz
Algorithm Hash digest
SHA256 14419ccd7e99ce14b9822f9e27fb9ae5a413ff1ac271a3e778c36b70d613d47e
MD5 939b3bf0cae87325ca28edf85e3ec11f
BLAKE2b-256 efca13e9dc01cce27875b9ef05a5d2de8ef7823d234bc01f95f655638026b8a7

See more details on using hashes here.

File details

Details for the file lakshaycalculator-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for lakshaycalculator-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 631d8bc092fe2dcd9a8b89780556a89740498a1f5732735c5a407a3db540c997
MD5 4f5e975e968678972453455dec9a1d5c
BLAKE2b-256 48495c2c4a03b968e2f98efe81a8189177cb3869da849609499c60b6575e6821

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