Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1.77 KB

README.MD

File metadata and controls

35 lines (25 loc) · 1.77 KB

Ruby Conditionals Lab

This guide assumes you have Ruby installed on your machine, a text editor, and a Github account already in place.

Uh-oh, Sam is still seeing ghosts! There is easily 27 defenders on the field right now, but rather than call a timeout, he is determined to overcome his fear by facing it head on. Sam has 3 plays he can audible into - a qb sneak, a hb screen, and a rollout Write a conditional statement that helps Sam call an audible, and returns the play result. In this lab, you will place your code inside an empty method called ghosts_audible in the file conditionals.rb. ghosts_audible takes a string as an argument.

This lab will test what you've learned so far about Ruby conditionals. If you need a refresher on conditonals, check out my blog post here.

BONUS POINTS:

  1. Try to work in string interpolation for one of your conditionals. Hint: it's the one with the play name in it.
  2. See if you can get the same output for "qb sneak" as you do for "QB SNEAK". Go on and investigate a bit!

Installation

To get started, fork this lab to your GitHub account, copy the repo url, then in your terminal enter:

git clone {repo url}

This will create a repository in your github and download your repo to your local machine so you can start working on it. When you solved all test cases follow thes steps:

git add .

This will add all files in your current directory to be committed to Github.

git commit -m "Done."

This will commit the changes you made and ready them to be pushed to Github. The `-m "Done."' part will add a message expalaining your commit.

git push

This will push your changes to the associated Github repo.