Created
September 23, 2014 21:37
-
-
Save phlipper/8ed8d24c76ec4c52e0ae to your computer and use it in GitHub Desktop.
TECH 601-00 Warm-up Exercise - Tuesday 2014-09-23
This file contains hidden or 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
| # 1. assign the string "5" to a variable and display the value | |
| # 2. assign the integer 5 to a variable and display the value | |
| # 3. add the two variables by coercing the first value to an integer, assign | |
| # that value to a variable, and display the value | |
| # 4. add the two variables by coercing the second value to a string, assign | |
| # that value to a variable, and display the value | |
| # 5. create an array which holds the previous values | |
| # 6. use a `for` loop to display each value in the array | |
| # 7. add your name to the end of the array | |
| # 8. use `each` to iterate through each value in the array, display the value | |
| # 9. display the value with your name | |
| # 10. add the string "example" to the beginning of the array | |
| # 11. display the value with "example" | |
| # 12. use `each` to iterate through each value in the array, display each value | |
| # along with the data type. Example: "Value: example - Type: String" | |
| # following: "Value: " | |
| # 13. assign your name to a variable | |
| # 14. assign your favorite color to a variable | |
| # 15. create a hash with the keys "name" and "color" with the values from the | |
| # variables above | |
| # 16. using values from the hash above, display the following: | |
| # "My name is Phil and my favorite color is Green." | |
| # 17. create another hash with values for a friend of yours | |
| # 18. create a new array using the people hashes above as values | |
| # 19. iterate through the array of people, display the following for each: | |
| # "My name is X and my favorite color is Y." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment