0

How can I create a basic hangman games in python with 2 player?? Please help me

How can I create a basic hangman games in python with 2 player?? Please help me

3/29/2020 6:48:10 PM

Amxl Amixul

13 Answers

New Answer

+8

Have you studied the basics of the language? (You seem to have not read the tutorial here.) That comes first. Then how are we supposed to help you? If we tell you exactly how to do it, it is us who will have written the game. You should give it an honest try to figure it out yourself. If you get stuck, show us what you've got, someone might give you a hint.

+4

I don't understand that question.

+3

Amxl Amixul It looks like you have no programming experience at all. Work your way through the Python course. You can't program a Hangman game if you don't even know the most basic basics. Even the print statements in your code are incorrect ...!

+2

Well, you need a list of words, where one is picked randomly from. You need a list of letters already chosen. Only if a letter of the word is in 'chosen', it will be printed, otherwise '_' (can be done with if else). You take user input in a loop and put it into chosen. If it's in word, great, if not - player loses one 'life'. (How you output the hangman is up to you, you could also just have a counter, so and so many moves.) If all letters found, won. If not moves left, game over. Something like this.

+2

There are several ways to set this up, depending on how you'd like it. Could be a solitaire game, with or without player name. Could be for several players, either fixed upper limit or unlimited (probably nonsense), with or without names. I think you should have some idea now though how this might play out. Now it's time for your own creativity. Think a bit about how you want to have it, then give it a shot! 😉 And when you're finished (or get into trouble), please show us!

+1

Simply you can t make good games as console programms here but your code is also broken you could start learning variables first

+1

If you want make simple games here start learning javascript and html

+1

very very broken undeclared variable and i guess the code is not complete if you doesnt want to see the player 1 guess just do this: import os #put in the top and then after the player 1 guess add this: os.system('clear') #this cleared the console doesnt work for sololearn tho

0

Thank you for your suggestions I know the basic concepts of it I just what to know if can be created a word guess with 2 player with python and what the suggestion start from

0

Yes I just want to clarify do I must need the list of word in chosen names or can the players 1 type the own to choose for the player 2

0

I said do I must need to put the choose name first

0

https://code.sololearn.com/cblFJXvZq474/?ref=app

0

See what wrong