Skip to content

Latest commit

 

History

History
37 lines (30 loc) · 957 Bytes

File metadata and controls

37 lines (30 loc) · 957 Bytes

Basic Calculator Program

This is a simple command-line calculator written in Python. It allows users to perform basic arithmetic operations: addition, subtraction, multiplication, and division.

Features

  • Accepts two integer inputs from the user
  • Supports the following operations: +, -, *, /
  • Handles division by zero with an error message
  • Provides clear output for each operation

Usage

  1. Run the program using Python:
    python Calculator.py
  2. Enter the first number when prompted.
  3. Enter the second number when prompted.
  4. Enter the desired operation (+, -, *, or /).
  5. View the result or error message.

Example

Enter the first number: 10
Enter the second number: 5
Enter an operation (+, -, *, /): *
10 * 5 = 50

Requirements

  • Python 3.x

Notes

  • Only integer inputs are supported.
  • Division by zero is handled gracefully.

License

This project is open source and free to use.