Question Description
I’m working on a python exercise and need an explanation to help me learn.
Choose one of the projects below.• Design and program must be object-oriented.• They should all be user-friendly and robust, being able to deal with user input errors;however, don’t go overboard, get it working first!Projects:1. Hangman (using graphics)Design and implement a simple version of the classic game Hangman usinggraphics library cs1graphics.As the heart of your program, implement a function playHangman(secret) thatmanages a single round of the game. The parameter is presumed to be a stringwhich is the secret answer; consider it unknown to the player.The game should begin by displaying a version of the answer with the originalspacing and punctuation, but each alphabetic character replaced by an underscore’_’ character. Then start asking the player to enter a single character as a guess. Ifthat character is hidden in the answer, inform the user of his success and re-displaythe disguised message but with all occurrences of the letter displayed. If the guesswas wrong, inform the user – draw the next part of the body. The wrong guessesshould be displayed too.This process should continue either until the entire message has been uncovered oruntil the full body is drawn (number of guesses reached the limit). At the end ofeach game user should be prompted for another round of the game.2. Tic-Tac-Toe (using graphics)Design and Implement a Tic-Tac-Toe game where you can play against anotherperson, using graphics library cs1graphics.Starting the design: – it looks good to havea TicTacToe class (which will be taking care of one game);an Input class which will take care of the inputan Output class (which will take care of the displaying one turn of the game).Maybe some other classes appear as “good to have” as soon as you start thinkingof what should be in each of the above class.CSI 31 Final Project Lists3. Towers of Hanoi (solved by Recursion) (using graphics)The game begins with three pegs and a tower of n disks on the first peg, stackedfrom largest at bottom to smallest at top. The goal is to move them all to the thirdpeg, moving only one disk at a time. Moreover, you are not allowed to place a diskon top of a smaller disk. Write a program that generates a solution to the problem +show it graphically.With three disks, the puzzle can be solved in seven moves: