(Translated by https://www.hiragana.jp/)
GitHub - shaai/wdi_1_ruby_hw_methods_calculator
Skip to content

shaai/wdi_1_ruby_hw_methods_calculator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Calculator Homework

Objectives:

  • Practice with functions, loops, conditions, user-input

Activity

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.

Calculator Specifications

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)

BONUS STAGE - HARD MODE

  • Calculator should have sine, cosine and tangent calculations. However, you should not use any built in trigonometric methods and you must create your own.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%