Suggested response format (based on feedback from other students & Srdjan’s blog post):
Using Markdown: use backticks
(Markdown formatting) to highlight variable names, methods, and lines you are referring to: On line 1
we initialize the local variable…
Always aim to answer: What does the following code output and return? Why? What concept does it demonstrate?
`
Additional Practice Problems:
What does the following code return? What does it output? Why? What concept does it demonstrate?
a = “Hello”
b = a
a = “Goodbye”
puts a
puts b
What does the following code return? What does it output? Why? What concept does it demonstrate?
a = 4
loop do
a = 5
b = 3
break
end
puts a
puts b