In this activity, you will learn about and practice writing some basic Ruby code.
Complete the TryRuby Tutorial: https://try.ruby-lang.org/
Additionally, perform the following tasks.
Important! All screenshots must include your computer’s desktop in the background so that it is recognizable as your desktop.
On the “Standing in Line” page, add the number 999
to the array, re-run the code, and take a screenshot.
On the “More Bite-Size Reviews” page, immediately after the line that adds the “Living colors” review to the hash, add the book “The Mythical Man-Month” with a rating of quite_good
, re-run the code, and take a screenshot.
On the “Are You Harsh?” page, there is alternative syntax for the each
loop. Edit the loop to be written as follows, re-run the code, and take a screenshot.
books.values.each do |rate|
ratings[rate] += 1
end
Edward III - 1593
.+
operator (e.g., puts "Hi" + "there!"
).to_s
method.On the “All’s Well That Ends Well”, update the call to print_plays
such that it lists the plays finished between 1500 and 1599, re-run the code, and take a screenshot.
On the “And Now For the Startling Conclusion”, correct the error regarding the equal comparison operator, re-run the code, and take a screenshot.
On the “Me hungry” page, change the method hungry?
to display “Me not hungry” and returning false
when the time is less than 12, re-rerun the code, and take a screenshot.
moodify
method will return a smiley string for a Blurb
object.I am never going back to that mountain. 2024-01-22 20:06:12 +0000 :-|
Insert your 8 screenshots into a Word DOCX and submit the file in the appropriate Canvas Assignment.