Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

python-calculator

A command-line calculator built in Python. Supports basic arithmetic operations.

How to run

Make sure you have Python 3 installed, then:

python calculator.py

Features

  • Addition, subtraction, multiplication, division
  • Division by zero handling
  • Clears the screen between operations

Known issues

  • Non-integer inputs (e.g. 2.5, abc) crash the program — try/except handling to be added
  • Division results are truncated to integers (e.g. 7 / 2 returns 3 instead of 3.5)
  • Invalid operation selections (e.g. 6, 7) cause a crash

Planned improvements

  • Input validation with proper error handling
  • Float support for both inputs and division results
  • Additional operations (exponentiation, modulo)

Notes

First Python script. Built as part of a self-directed learning roadmap toward fintech development.

About

CLI calculator built in Python 3

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages