Week 8 Homework - Programming-from-A-to-Z/A2Z-F15 GitHub Wiki

Due Nov 9

Pick one for a homework exercise (just one, not all!)

  1. Use a Context-Free Grammar to generate text. It's not required to write any new code for this assignment, you could just play with the examples and document your results in a blog post. Here are some approaches you could take:
  • Invent your own grammar and use one of the existing examples to generate text with it. There are lots of example grammars you can find online, though you will likely have to reformat them to be the grammar syntax from my example or JSON.
  • Rework any of the example programs to use something other than text (or, at least, text that represents language) as its basic unit. For example: musical notes, songs in playlists, pixels in an image, shapes in a drawing, etc.
  • Build a grammar that pulls its terminal words from Wordnik.
  • Build a grammar based on a source text as demonstrated heresource code.
  • Getting results from a context-free-grammar can be tricky. Consider a twitter bot, and the conciseness of 140 characters. Something short and sweet, highly structured ideas may work well: * A coffee drink order generator. * An apology generator. * An ITP project idea generator. * A knock knock joke generator.
  1. Try the closure exercises. Document your results in a blog post.

  2. Continue working on your Text Input project, document your progress in a blog post.

Questions?

  • add your question here

Links