Skip to content

mR4smussen/regex-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

regex-calculator

Backstory

This small project was made back in the summer of 2021, where a "friend" of mine had the curtesy to tell me that making a calculator was a greate way to learn a language. What he forgot to mention was to not use regular expressions to do so. I guess I did learn a language trying to use regex, this was not Python nor regular expressions, but Stackoverflow.

Functionality

This is a calculator run only in a command line. Running the calculator asks the user for a math expression, and then it return the result. Supported operations are -, +, /, * and parenthesis (exp).

Example

$ python3 calculator.py
start by giving me a math expression to solve. You can use [+] [-] [/] [*] [(exp)].
:(4/(5*6))*(5/9)+5*(5-6)
(4/(5*6))*(5/9)+5*(5-6) = -4.925925925925926

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages