Skip to content

luk707/ScientificCalculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ScientificCalculator

Scientific calculator written in python

Usage

clone the repository and cd into the project directory. Run the REPL environment with the following command:

$ python calc.py

You can enter expressions as demonstrated below

> 72 * 3 / 9 * (6 + 4)
240.0

At this point in time the calculator supports the following operations:

command usage description
ans ans() returns the last evaluated answer
exit exit() exits the REPL
average / mean mean(x, y, ...) returns the mean value of given expressions
sum sum(x, y, ...) returns the sum of the given expressions
add x + y adds left operand to right operand
subtract x - y subtracts left operand from right operand
multiply x * y multiplies left operand by right operand
divide x / y divides left operand byt right operand
remainder x % y remainder of left operand divided by right operand

expressions can be passed to the calculator via the command line too:

$ python calc.py "1 + 2"
3.0

About

Scientific calculator written in python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages