https://github.com/astrojuanlu/scicalc
Simple scientific calculator written in Python
https://github.com/astrojuanlu/scicalc
Last synced: 4 months ago
JSON representation
Simple scientific calculator written in Python
- Host: GitHub
- URL: https://github.com/astrojuanlu/scicalc
- Owner: astrojuanlu
- Created: 2016-06-14T08:18:01.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-14T08:26:32.000Z (about 9 years ago)
- Last Synced: 2025-01-25T21:11:37.203Z (5 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
# Toptal First Project
## Statement
Write a simple scientific calculator app with the following features:
* the calculator supports addition, subtraction, multiplication, division, log on floating point numbers
* the calculator can solve simple linear equations with a single variable (namely, x), for simplicity, only addition, subtraction and multiplication operations are allowed
* the calculator supports parentheses in both modes
* the calculator should have a language parser
* do not use any library that can accomplish any of the listed requirements
* the calculator should handle all error cases properly (by carefully indicating the errors to the user)## Examples
input: (3+(4-1))*5
output: 30input: 2 * x + 0.5 = 1
output: x = 0.25input: 2x + 1 = 2(1-x)
output: x = 0.25