CMPUT174 Lecture 8: Remember V4 Reflection Activity Solution
ceruleanzebra152 and 30 others unlocked
25
CMPUT174 Full Course Notes
Verified Note
25 documents
Document Summary
Q1 modify the given code such that it eliminates non-adjacent duplicate line groups by implementing and then calling a user-defined function. Given code def main(): word_list = ["orange","apple","blueberry","kiwi"] title = "print the fruits" symbol = "*" message = "the end" print(title) print(symbol) for word in word_list: print(title + " " + word) print(title) print(symbol) print(symbol + message + symbol) main() Q2 consider the program segment from remember version 4 to answer the following questions: """ prompt the player to enter a word that begins with a particular letter and return the answer. Letter is a str which contains the particular letter. Window is the uagame window object prompt = "what word begins with the letter " + start_letter + "?" display_icon( word = window. input_string( window. clear() return word. 2. 1 circle all arguments and underline all parameters in the given program segment. 2. 2 list each kind of statement in the given program segment. function definition, assignment, expression, return.