Skip to content

A simple command-line calculator built with Python that performs basic arithmetic operations: addition, subtraction, multiplication, and division. Includes error handling for invalid inputs like division by zero. Ideal for beginners learning how to take user input, use functions, and apply basic control flow.

Notifications You must be signed in to change notification settings

sojupatil/Python-CLI-Calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Python CLI Calculator

A beginner-friendly command-line calculator written in Python.
This project takes two numbers from the user and performs basic arithmetic operations such as:

  • Addition
  • Subtraction
  • Multiplication
  • Division

๐Ÿš€ Features

  • Simple and clean CLI interface
  • Function-based structure for better readability
  • Handles invalid operations and division by zero
  • Good starter project for learning Python basics

๐Ÿ“ธ Sample Output

Enter First Number: 10
Enter Second Number: 5
Choose Operation:
 - add for Addition
 - sub for Subtraction
 - mul for Multiplication
 - div for Division
Enter your choice: div
Result: 2.0

About

A simple command-line calculator built with Python that performs basic arithmetic operations: addition, subtraction, multiplication, and division. Includes error handling for invalid inputs like division by zero. Ideal for beginners learning how to take user input, use functions, and apply basic control flow.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages