A simple calculator for elementary school students to practice addition and subtraction.
Project description
Calculator Project
Overview
The Calculator Project is a simple yet effective tool designed to help elementary school students practice basic arithmetic operations, specifically addition and subtraction. This project provides a user-friendly interface for generating random math problems and validating user input.
Features
- Addition and Subtraction: The core functionality allows users to perform addition and subtraction operations.
- Random Problem Generation: Utility functions generate random math problems to keep practice sessions engaging.
- Input Validation: Ensures that user inputs are valid integers, preventing errors during calculations.
Installation
To install the Calculator Project, you can use pip. Run the following command in your terminal:
pip install calculator_project
Usage
After installation, you can use the calculator in your Python scripts as follows:
from calculator import Calculator
calc = Calculator()
result_add = calc.add(5, 3) # Returns 8
result_subtract = calc.subtract(5, 3) # Returns 2
Running Tests
To ensure the functionality of the calculator, you can run the unit tests provided in the project. Navigate to the src/tests directory and run:
python -m unittest test_core.py
Contributing
Contributions to the Calculator Project are welcome! If you have suggestions for improvements or new features, please feel free to submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
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 calculator_suoxd-0.1.1.tar.gz.
File metadata
- Download URL: calculator_suoxd-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbfbe8663adb063d994c394239bf26bdfb3ef1d47e96ac920757cb970b03a36b
|
|
| MD5 |
bfee98068f998d6e7cc51b4d43f7eec4
|
|
| BLAKE2b-256 |
b4df6b7edd4280a4c8cdde49a26f091a9a23bf9a589f1d355f5da23cd800dfe6
|
File details
Details for the file calculator_suoxd-0.1.1-py3-none-any.whl.
File metadata
- Download URL: calculator_suoxd-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
040f06d169e31951714c662d445ebaf88c277bf9279fdba4162d0e4a7c6b3c72
|
|
| MD5 |
5551b176f15e029271781450c713fdcf
|
|
| BLAKE2b-256 |
75726907cad0408d94ffcf7cea1d90f061a5ceff5d4eb063577d9415c051a169
|