Challenge 4: MadLib

Challenge 4 was all about making a MadLib; that game with an existing story framework, and you fill in the blanks with random words, prompted only by the kind of word, ie: noun, adjective, verb, and adverb. This one was actually pretty easy, and my original answer was decent. I prompted for words, plugged them into variables, and then used the variables in a one sentence story. I wasn’t particularly invested in building onto it, but the basic result was solid.

I went back through it and changed a couple things up, such as adding the method hasNumeral? And getString(prompt) to make sure the input was a word consisting of letters without numerals. I’ve talked about those methods in other challenges, so I won’t go into detail, but here’s a fun story!

Published by corbettbw

I am a Ruby developer in Phoenix, AZ. I'm interested in the intersection of technology and social justice, love weird science facts, and my dog, Coco; a cute black lab/pit bull mix, who won't stop eating rocks.

Leave a comment