Article

Obsidian Source: Drafts / Problems - Eval.

Summary

Pending synthesis from local Obsidian source.

Original source title: Problems Eval.

Extracted Preview

To complete this challenge you’ll need to parse a mathematical expression and then perform the relevant calculations before returning the answer to the user.
For example, the user will be able to input: 2 * 3 + 4 and get back 10, or input 10 / (6 - 1) and get back 2.
Completing this challenge will give you the chance to make use of the stack data structure in a real-world application.

___

Task: A CLI tool to parse mathematical expression. Given user string(str) it evaluates the answer to the expression(int/float).

Assumptions:

1. CLI Tool.

2. User always enter an expression - with the operations of DMAS(+, -, /, \*, ) - later we might add power and brackets(what we do in Polish/Reverse Polish notation).

3. When replacing in polish notation, the next string in one digit only.

4. Assumed that the string has been given in DMAS format.

What to improve upon:

1. Add power, bracket notation support.

2. The string could be in any format, so we need to decide the priority ourselves.

Integration Notes

  • Source folder: /home/yashs/Documents/Docs/Obsidian/Research-Notes
  • Local source: /home/yashs/Documents/Docs/Obsidian/Research-Notes/Drafts/Problems - Eval..md
  • Raw copy: raw/obsidian/research-notes/Drafts/Problems - Eval..md

Links Created Or Updated

Open Questions