A small example package
Project description
Calculator Project
Project Description
The Calculator Project is a simple yet powerful calculator application written in Python. It supports basic arithmetic operations such as addition, subtraction, multiplication, and division. The project is designed to provide an easy-to-use interface for performing quick calculations and serves as an educational tool for those learning Python programming.
Features
- Addition: Add two numbers.
- Subtraction: Subtract one number from another.
- Multiplication: Multiply two numbers.
- Division: Divide one number by another.
- Command-line Interface: Perform calculations directly from the terminal.
Installation
Requires Python 3.7 or higher.
-
Clone the Repository:
git clone https://github.com/yourusername/calculator.git
-
Navigate to the Project Directory:
cd calculator
-
Install Dependencies (if any):
pip install -r requirements.txt
Usage
Command-line Usage
You can use the calculator directly from the command line.
-
Run the Calculator:
python calculator.py -
Perform Operations:
# Example: Addition python calculator.py add 2 3 # Output: 5
Example Code
You can also use the calculator functions in your Python code.
from calculator import add, subtract, multiply, divide
# Perform addition
result = add(10, 5)
print(f"10 + 5 = {result}")
# Perform subtraction
result = subtract(10, 5)
print(f"10 - 5 = {result}")
# Perform multiplication
result = multiply(10, 5)
print(f"10 * 5 = {result}")
# Perform division
result = divide(10, 5)
print(f"10 / 5 = {result}")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nandanisamplepackage-0.0.2.tar.gz.
File metadata
- Download URL: nandanisamplepackage-0.0.2.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eacb05d9d38f03e924994d306fbe4931e3f9ecb58dadd4483eaae2582dc4f55b
|
|
| MD5 |
a03639d1d4f086bc6de5d872343fe263
|
|
| BLAKE2b-256 |
dbe05844b659f908885b7e87a73dfda932a2797d200c0204d8cab1a626826173
|
File details
Details for the file nandanisamplepackage-0.0.2-py3-none-any.whl.
File metadata
- Download URL: nandanisamplepackage-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc4ec0ca73f3a7e6ae269f6967f32f716575c5eabfa07aa6dfa805b50889ca6b
|
|
| MD5 |
9cbe583ac1ad0a5c0bdd93e069af34e1
|
|
| BLAKE2b-256 |
f484b74152e2e4cee1d717496d090fe2251627b5b9b0485eca8d9f07935e4d19
|