Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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: 30

input: 2 * x + 0.5 = 1
output: x = 0.25

input: 2x + 1 = 2(1-x)
output: x = 0.25