Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hangman game
#1
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.
Reply
#2
What GUI library are you using?
Recommended Tutorials:
Reply
#3
I suggest you lay out the functions required covering the basic logic flow to solve the problem, and not worry about the graphics initially. Just print standard output saying what should happen for now.

Once the basic functionality is working, you can then switch to using graphics and making things more event driven.
I am trying to help you, really, even if it doesn't always seem that way
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Homework Hangman Game jagr29 3 2,331 Jan-20-2022, 10:38 PM
Last Post: deanhystad
  Hangman-Game (German code) .. Unkreatief 1 3,695 Mar-22-2017, 10:30 AM
Last Post: Kebap

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020