CMPUT174 Lecture 1: Remember The Word Version 4
ceruleanzebra152 and 30 others unlocked
25
CMPUT174 Full Course Notes
Verified Note
25 documents
Document Summary
# remember the word version 4 - user defined functions. # create the window, display the icon and display instructions. # display results - output win or condolence message but not both. # replace adjacent duplicate line groups with a repetition. # main algorithm import time from uagame import window def main(): # display instructions text_size = 24 text_color = "white" display_instructions(window,text_size,text_color) # function call. # create word list word_list = ["orange","chair","mouse","sandwich"] correct_answer = word_list[1] start_letter = correct_answer[0] # function call to display the word display_words(window,text_size,text_color,word_list) # get guess - function call guess = get_guess(window,text_size,text_color,start_letter) # display results - function call display_results(window,text_size,text_color,guess,correct_answer) de. # display icon display_icon(window) # function call def display_icon(window): # -window is uagame. window object on which the instruction are displayed. # -text_color is str object for text color window. set_font_size(text_size) window. set_font_color(text_color) x = 0 y = 0 font_height = window. get_font_height()