CMPUT174 Lecture 1: Remember The Word Version 4

69 views6 pages
ceruleanzebra152 and 30 others unlocked
CMPUT174 Full Course Notes
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()

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