Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astrojuanlu/scicalc
Simple scientific calculator written in Python
https://github.com/astrojuanlu/scicalc
Last synced: about 1 month 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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-06-14T08:26:32.000Z (over 8 years ago)
- Last Synced: 2024-10-14T19:59:17.623Z (2 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