Skip to main content

No project description provided

Project description

Smart Calculator

Smart Calculator is a simple Python package that provides basic arithmetic operations: addition, subtraction, multiplication, and division. It can be used as both a Python module and a command-line tool.


Features

  • Addition: Adds two numbers.
  • Subtraction: Subtracts the second number from the first.
  • Multiplication: Multiplies two numbers.
  • Division: Divides the first number by the second.

Installation

Install the package using pip:

pip install smart_calculator

Usage

As a Python Module

  • You can use the functions provided by smart_calculator in your Python code.
from smart_calculator import add, sub, mult, div

# Examples
print(add(5, 3))    # Output: "value of addition: 5 + 3 = 8"
print(sub(10, 4))   # Output: "value of subtraction: 10 - 4 = 6"
print(mult(2, 7))   # Output: "value of multiplication: 2 x 7 = 14"
print(div(9, 3))    # Output: "value of division: 9 / 3 = 3.0"

Here's the complete README.md file with all the information organized into one file:

markdown Copy Edit

Smart Calculator

Smart Calculator is a simple Python package that provides basic arithmetic operations: addition, subtraction, multiplication, and division. It can be used as both a Python module and a command-line tool.


Features

  • Addition: Adds two numbers.
  • Subtraction: Subtracts the second number from the first.
  • Multiplication: Multiplies two numbers.
  • Division: Divides the first number by the second.

Installation

Install the package using pip:

pip install smart_calculator
Usage
As a Python Module
You can use the functions provided by smart_calculator in your Python code.

python
Copy
Edit
from smart_calculator import add, sub, mult, div

# Examples
print(add(5, 3))    # Output: "value of addition: 5 + 3 = 8"
print(sub(10, 4))   # Output: "value of subtraction: 10 - 4 = 6"
print(mult(2, 7))   # Output: "value of multiplication: 2 x 7 = 14"
print(div(9, 3))    # Output: "value of division: 9 / 3 = 3.0"

As a Command-Line Tool

After installing, you can use the smart_calculator command in your terminal.

Syntax:

smart_calculator <operation> <num1> <num2>

Operations:

  • add: Adds two numbers.
  • sub: Subtracts the second number from the first.
  • mult: Multiplies two numbers.
  • div: Divides the first number by the second.

Examples

smart_calculator add 5 3
# Output: value of addition: 5 + 3 = 8

smart_calculator sub 10 4
# Output: value of subtraction: 10 - 4 = 6

smart_calculator mult 2 7
# Output: value of multiplication: 2 x 7 = 14

smart_calculator div 9 3
# Output: value of division: 9 / 3 = 3.0

Author

Chukwunonso Smart Agbawo

chukwunonsosmartagbawo@gmail.com

Youtube Channel: https://www.youtube.com/channel/UCorbJd14KqURch108tAqgVw

License

This project is licensed under the terms of your preferred license.

This complete file includes installation instructions, usage as both a Python module and command-line tool, local development setup, distribution, and requirements for your package. Feel free to adjust the sections further as needed!

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

smart_calculator-0.3.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

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

smart_calculator-0.3.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file smart_calculator-0.3.1.tar.gz.

File metadata

  • Download URL: smart_calculator-0.3.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for smart_calculator-0.3.1.tar.gz
Algorithm Hash digest
SHA256 2c25796493ef98848113e66d164db871bc2ec7105e349e8276156f366b0f574d
MD5 243584b0391c5dfbe2f78b9af7c96dd4
BLAKE2b-256 f2fc24eb83758b6d8cd5769a4eb89029f402af004aa2d5ad1c540a311dd3064c

See more details on using hashes here.

File details

Details for the file smart_calculator-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for smart_calculator-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 59b30e56f51cbfd98e04bb4a122d3e5e904da9287b9734e1bdb550eef5b1f75f
MD5 b19bf939555e5f2bb4086601b1497647
BLAKE2b-256 36b4ebf9df875add10aa48888a25916db021ec31eed91e5cc76a9b01fcee20dc

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