AI Assignment: Generating and Validating Blurbs - Semester 1
VerifiedAdded on 2019/09/16
|1
|308
|208
Homework Assignment
AI Summary
This assignment involves creating a program to generate and validate strings based on a specific grammar. The first part of the assignment requires writing a program to generate 10 random 'Blurbs', which are defined recursively in terms of 'Whoozits' and 'Whatzits'. 'Whoozits' consist of an 'x' followed by one to ten 'y's, while 'Whatzits' consist of a 'q' followed by either a 'z' or a 'd', followed by a 'Whoozit'. The second part requires writing a program that takes a string as input and checks whether it is a valid 'Blurb'. The program should continue to prompt the user for input until 'DONE' is entered. The solution likely involves recursive functions to parse and validate the structure of the strings based on the defined grammar, and provides a framework for understanding and implementing the concepts of language generation and validation using programming.






