- When is it useful to use a
conditional
in your code?
- Any time we would need the code to make a decision we will want to ask it a conditional. We can make the code pursue different actions based the quality of data compared in a conditional statement.
followers = 1000
def account_verification
if followers >= 750
p "you are verified"
else
p "you are not verified"
end
end
In the above example I made a simple method to be able to print out different messages based on the amount of followers there are.
- If you could do this assignment over, what would you do differently?
- I would want to focus more on honing my workflow to be quicker. I can practice keyboard shortcuts and I can try to condense my responses to only include what is strickly necessary in the future.
- My fizzbuzz could probably be more optimized.
- My early commit messages where lacking an reference to the specific files being worked on, in the future I will make it a goal to include that in my messages when appropriate.
- What about your thinking, learning, or work today brought you the most satisfaction? Why?
- I enjoyed doing the "FizzBuzz " challenge from the README section. It was an engaging excercise that I was able to learn more about how Ruby functions and about logical method strutures as well.