Nov-05-2017, 08:38 PM
Hello, I have a homework assignment that I am having difficulty with. If anyone can help it is greatly appreciated! Thanks Here is the question:
Use the graphics package to create a window that displays the current balance and status of the puzzle: each time the user guesses a letter, both the balance and status are updated accordingly. Inaddition, the user should be able to select(via mouse)whether to solve the puzzle or guess another letter, and then be guided (by some sort of text entry box) to enter his solution/guess. It’s up to you how you want to set this up,but all user interaction should be via the graphical interface. Important note: Despite the extra code necessary for the graphical interface, keep the main function relatively clean. Introduce functions as a way of minimizing the “junk” in your main function.
Right now, the only code I have is:
win1 = GraphWin("Homework 3", 500,500)
win1.setBackground ("blue")
I particularly need help with the text entry box part.
Use the graphics package to create a window that displays the current balance and status of the puzzle: each time the user guesses a letter, both the balance and status are updated accordingly. Inaddition, the user should be able to select(via mouse)whether to solve the puzzle or guess another letter, and then be guided (by some sort of text entry box) to enter his solution/guess. It’s up to you how you want to set this up,but all user interaction should be via the graphical interface. Important note: Despite the extra code necessary for the graphical interface, keep the main function relatively clean. Introduce functions as a way of minimizing the “junk” in your main function.
Right now, the only code I have is:
win1 = GraphWin("Homework 3", 500,500)
win1.setBackground ("blue")
I particularly need help with the text entry box part.