In today's "Classwork" directory, write a short Ruby program that tracks all the things Anastasia does while her son, Desmond, sleeps.
- Create a variable,
desmond_is_sleepingand assign it the value oftrue - Create a variable,
anastasias_accomplishmentsand assign it an empty string"" - Create a while loop that will run as long as Desmond is sleeping.
- As long as Desmond sleeps, ask Anastasia what errand she runs. Add it to the end of
anastasias_accomplishments, along with a comma + space, as this should print as a string. - Just before the end of the while loop, ask Anastasia if Desmond is still sleeping. Depending on her answer, assign
desmond_is_sleepingto either true or false. - After Desmond wakes up, print the value of
anastasias_accomplishmentsto the console.
Make it print in a sensible manner.
Example: While the Cradle Rocked, Anastasia built up her foundation in Ruby, took a nap herself, and went to the corner grocery.