Lab 4⃣.0⃣ ListsOctober 21, 2016
Create a variable for each part of speech below, and set each variable to hold a list of words that fit that part of speech. Some examples are given, but feel free to use your own.
|Part of Speech||Definition||Example Words|
|noun||person, place, or thing||giraffe, monkey, boy, girl, elephant, … people’s names…|
|verb||action word||jumps, runs, sleeps, sits, dances, …|
|adjective||describes a noun||big, small, loud, silly, young, old, sleepy, …|
|adverb||describes a verb or an adjective||quickly, excitedly, angrily, happily, sadly, …|
|article||introduces noun: the book, a giraffe||a, the|
|preposition||relates a noun to something else||under, over, around, near, beside, …|
Write a custom reporter block called “noun phrase” that reports a noun phrase where each word is chosen randomly from the lists you created. A noun phrase consists of an article, an adjective, and a noun in that order.
Write custom reporter blocks like
noun phrase for each of the phrase types listed below.
|prepositional phrase||preposition, noun phrase|
|verb phrase||adverb, verb, preposition phrase|
|sentence phrase||noun phrase, verb phrase|
Write code so that when you press the spacebar, a random sentence is generated and a sprite says a sentence.
Changing Our Vocabulary
- Write a script so that when the ‘n’ key is pressed, the user is prompted for a new noun and that noun is added to list of nouns. After that point, the new noun entered by the user should be able to appear in sentences.
- Write scripts to add words to the other lists. Use the keys listed below.
|Key||Part of speech|