CMPUT174 Lecture 8: Remember V4 Reflection Activity Solution

93 views2 pages
ceruleanzebra152 and 30 others unlocked
CMPUT174 Full Course Notes
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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents