- Practice with functions, loops, conditions, user-input
You choose from one of the following activities.
- You may build a calculator. A calculator can perform multiple arithmetic operations. Your function should allow the user to choose which operation is expected, enter in the values to perform the operation on, and ultimately view the result.
- You may explore the objective topics and produce a small basic game, or other exercise of your liking in Ruby. Recommendations include dice games, hangman, text adventure/stories or slot-machine like game. Do not attempt to use any graphics libraries or game frameworks.
Should you decide to build the calculator, follow the instructions below.
###Specification:
- A user should be given a menu of operations
- A user should be able to choose from the menu
- A user should be able to enter numbers to perform the operation on
- A user should be shown the result
- The program should exit after one calculation is made
#####Phase 1
- Calculator functionality
- Calculator should be able to do basic arithmetic (+,-, *, /)
#####Phase 2
- Advanced Calculator functionality
- Calculator should be able to do more advanced arithmetic (exponents, square, cube, square roots)
- Calculator should have sine, cosine and tangent calculations. However, you should not use any built in trigonometric methods and you must create your own.