Skip to content

shaikrakheeb28/simple-python-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Simple Calculator App (Python)

Overview

This is a command-line based calculator application built with Python. It supports:

  • Addition
  • Subtraction
  • Multiplication
  • Division

Features

  • Easy to use CLI interface
  • Handles invalid inputs and division by zero
  • Includes unit tests for key functionalities

How to Run

Requirements

  • Python 3.x
  • PyCharm IDE (or any Python environment)

Steps

  1. Clone or copy the project files.
  2. Open the project in PyCharm.
  3. Run calculator.py to use the calculator.
  4. To run tests, run test_calculator.py using pytest.

Installation

pip install pytest

Test Cases

Operation Input Output
Add 10 + 5 15
Subtract 10 - 5 5
Multiply 10 * 5 50
Divide 10 / 5 2.0
Divide 10 / 0 Error

Author

Shaik Rakheeb - (https://github.com/shaikrakheeb28)

About

A simple command-line calculator application built using Python. It supports basic arithmetic operations with proper input validation, error handling, and unit tests implemented using pytest. Ideal for beginners to understand Python functions, CLI interaction, and testing fundamentals.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages