Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 663 Bytes

README.md

File metadata and controls

40 lines (28 loc) · 663 Bytes

Basic-calculator---python-cli

A beginner-friendly command-line calculator built with Python using functions, dictionaries, exception handling, and input validation.

Simple Python Calculator

A simple command-line calculator written in Python.

Features

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)
  • Input validation
  • Division-by-zero handling
  • Clean function-based structure

Usage

Run the program:

python calculator.py

Example

Enter your first number: 10
Enter your second number: 5
Choose an operator (+, -, *, /): *
10.0 * 5.0 = 50.0

Requirements

  • Python 3.x

Author

Sazid Al Mafi