Exercise 1 - Create a simple calculator
In this exercise, we'll create a simple command-line calculator. It should work like this:
1. Get a number from the user.
2. Get an operator from the user. ('+', '-', '*', '/')
3. Get another number from the user.
4. Calculate and display the result.
Once this functionality is done, add more features to it such as asking whether the user wants to calculate another number, adding more operators, allowing the user to build an equation with more than one operator, or adding parens and order of operations. Feel free to add as many features as you'd like, but don't get too into it. There is still much to do. Don't spend more than 8 hours on features.
Save the calculator in a directory and create a Github repo for it. Post a link to the repo on the comments below and provide feedback to at least 3 of your peers. To provide feedback create an Issue on your peer's repo.
Note: You're not allowed to use the "eval" function in the exercise.
Sample Solution:
2 comments