Skip to content

Instantly share code, notes, and snippets.

@worace
Last active May 10, 2016 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save worace/c70112f57c7c6ef02126bfe4faddea3e to your computer and use it in GitHub Desktop.
Save worace/c70112f57c7c6ef02126bfe4faddea3e to your computer and use it in GitHub Desktop.
Flow Control Exercise

Flow Control Exercises

Let's practice manipulating some of Ruby's Flow Control mechanisms while working on a basic algorithm exercise.

Exercise

Flow Control Recap

More Info on Flow Control

Assignment

Spend 20 minutes working on the first challenge. Implement the solution twice, using 2 of the following looping tools:

  • each
  • for loop
  • while loop
  • until loop
  • loop loop

Then spend 5 - 10 minutes recapping and sharing solutions for that exercise

Next spend 30 minutes working on the second challenge. Again, implement it twice using 2 of the available looping techniques.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment