Created
December 6, 2013 23:43
-
-
Save damianesteban/7834086 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Week One Exercise One | |
# Before executing the code given below, guess the results. Next, execute the code. | |
# Did you get it right? If you did not get it right, can you think of why? | |
# Discuss your first guess and what you got when running the code. Goal: Understanding | |
# operator precedence and association. | |
y = false | |
z = true | |
x = y or z | |
puts x # false | |
(x = y) or z | |
puts x # false | |
x = (y or z) | |
puts x # true | |
# I got these all correct on the first try, however I mut admit that I've studied quite a bit | |
# of boolean arguments in various programming languages so this was pretty easy for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment