Welcome to the Calculator CLI App project! In this project, you will implement a command-line calculator with basic and advanced mathematical functions. A basic, yet powerful calculator app built using Python. This project demonstrates the use of fundamental programming concepts such as functions, conditionals, and loops. It allows users to perform basic arithmetic operations including addition, subtraction, multiplication, division and more.
-
Fork the Repository:
- Click the "Fork" button on the top right of this repository to create your own copy.
-
Clone Your Fork:
- Clone your forked repository to your local machine:
git clone https://github.com/YOUR_USERNAME/calculator-cli-app.git
- Clone your forked repository to your local machine:
-
Create a Branch:
- Create a branch with your name (e.g.,
MbaliP):git checkout -b YOUR_NAME
- Create a branch with your name (e.g.,
-
Implement the Functions:
- Open
calculator_functions.pyand implement the functions as described in the docstrings. - Test your implementation using the provided unit tests.
- Open
-
Run the Tests:
- Install
pytestif you don't have it on Windows:on Mac/Linux:pip install pytest
sudo apt install python3-pytest
- Run the tests:
python3 -m pytest
- Install
-
Commit and Push Your Changes:
- Add your changes:
git add calculator_functions.py
- Commit your changes:
git commit -m "Implemented calculator functions" - Push your changes to your branch:
git push origin YOUR_NAME
- Add your changes:
-
Submit a Pull Request:
- Go to your forked repository on GitHub and click "New Pull Request".
- Select your branch (
YOUR_NAME) and submit the pull request to the main repository.
In a few days, we will extend this project to create a mobile app using Flet. Stay tuned for updates!
To run the tests, use the following command:
pytest tests/test_calculator_functions.py- Only submissions from branches named after the student (e.g., john-doe) will be accepted.
- Ensure your code is well-documented and follows best practices.
- If you encounter any issues, feel free to ask for help!