Skip to content

NazarTarasuk/python-cli-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฎ Python CLI Calculator

Simple command-line calculator written in Python.

๐Ÿš€ Features

  • Basic operations: +, -, *, /, %
  • Works with float numbers
  • Command system:
    • history โ†’ show calculation history
    • exit โ†’ close program
    • help โ†’ show available commands
  • Input validation (handles wrong input)
  • Error handling (e.g. division by zero)
  • Clean modular structure

โ–ถ๏ธ How to run

python main.py
๐Ÿ’ก Example usage
=== CALCULATOR ===
Operations: + - * / %
Commands: history, exit, help

Enter first number: 10
Enter operator (+ - * / %): *
Enter second number: 5

Result: 50

๐Ÿ“ Project structure
.
โ”œโ”€โ”€ main.py
โ””โ”€โ”€ README.md
๐Ÿ›  Future improvements
Add power operator (^)
Add full expression parsing (2 + 2 * 5)
Save history to file
GUI version
๐Ÿ‘ค Author

Nazar Tarasiuk

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages