Skip to content
← Back to Community
Hangman in python
Profile icon
RemyBozung

I worked very hard on this and it took me quite a while. There are still some bugs that can get covered in the rules in the beginning. have_fun = True :)

Voters
Profile icon
FionaShanahan
Profile icon
theknightD2
Profile icon
Icodedtheweb
Profile icon
ItyeBoi29
Profile icon
BlamelessShoe79
Profile icon
DragonQuester
Profile icon
BenCavanaugh
Profile icon
Arushm7l
Profile icon
xNem3s1s
Profile icon
URIAHSASSON
Comments
hotnewtop
Profile icon
JBloves27

Nice!

Profile icon
RemyBozung

@JBYT27 thanks

Profile icon
JBloves27
Profile icon
Kookiez

huh nice

Profile icon
RemyBozung
Profile icon
Code1Tech
Profile icon
RemyBozung

@Code1Tech Good job! Did you look at the lists of words? :)

Profile icon
Code1Tech
Profile icon
OldWizard209

Nice game @RemyBozung but there can be some changes.

  1. Firstly after I ran out of guesses, I got -1 guesses left. You should probably fix that.
    image
    2.You should also display the word after the guesses are over
    3.First there were 5 letters to fill and then there were only 4. You might want to fix that as well.
    image
    Other than that cool game!!!! Nice Job @RemyBozung. Keep it up
Profile icon
RemyBozung

@abdullahrajput9 Yeah my lastest post talks about that but the reason It goes from 5 to 4 is because you guessed one and it replaces that _ with the letter.

Profile icon
Alice688

It's great! But, maybe use time.sleep() because, it takes some time to read and it would be nice to have some pauses in between.

Profile icon
AustinZhang1

Hello!
I really like your hangman game! However, there are many things that you should fix. First of all, it was pretty easy to guess the word as they are in plain sight for us to see.

image

Secondly, you should improve this:

image

It is pretty messy and takes a while to understand.

You can get some ideas from my hangman: https://repl.it/talk/share/Hangman/46967

Profile icon
RemyBozung

@AustinZhang1 My new comment mentions your second thing but is there a better way to hide the words besides making an API or a database?

Profile icon
AustinZhang1
Profile icon
RahulChoubey1

@AustinZhang1 But .env files can only be accessed if you're the owner. That means that only the creator will be able to play the game.

Profile icon
TheHappyShow10

Very nice I'm impressed!

Profile icon
SUHASTADIPARTH1

Nice.

Profile icon
Muffinlavania

Cool! This looks pretty complicated... And if you want look at this, its my hangman in python with turtle that i made a while ago.
Take some inspiration from that idk

Profile icon
miralegotsmart

Interesting, looks amazing.

Profile icon
UCYT5040

Instead of

print("Here are the rules: ") print("You will be asked to insert a letter of your choice, you will then be told if your letter was in the word or not!") print("If you have completed all letters, press any letter (excluding the ones already guessed) to win!") print("The following will result in errors: Entering the same letter twice") print("When you get all of the letters its a little bit broken but you can just type any letter you haven't yet typed to win") print("Good luck!") print("")

do

print("Here are the rules:\nYou will be asked to insert a letter of your choice, you will then be told if your letter was in the word or not!\nIf you have completed all letters, press any letter (excluding the ones already guessed) to win!\nThe following will result in errors: Entering the same letter twice\nWhen you get all of the letters its a little bit broken but you can just type any letter you haven't yet typed to win\nGood luck!\n")
Profile icon
RemyBozung

@JeremiahSaunder Cool thanks!

Profile icon
AKASomeone

@JeremiahSaunder yeah that is way better

Profile icon
TheHappyShow10

maybe in stead of that do print("Here are the rules:\nYou will be asked to insert a letter of your choice, you will\n then be told if your letter was in the word or not!\nIf you have completed all letters, press any letter (excluding the ones already guessed) to win!\nThe following will result in errors: Entering the same letter twice\nWhen you get all of the letters its a little bit broken but you can just type any letter you haven't yet typed to win\nGood luck!\n")@JeremiahSaunder

Profile icon
TheHappyShow10

there is a \n after then to look even cleaner @JeremiahSaunder

Profile icon
Bigbodyboy21

@RemyBozung I guessed natural, however when I had guessed it, it failed. I recommend pathways for each option, it will take a while, but in the end you will get higher functioning program. Other than that, the entire concept is perfect love it. But while you are doing that, I recommend importing os and sys to do os.system('clear') so then it's more room for the players. And I recommend designing a hang man, which I can do for you. It's just one line of code this
print("|--|\n| o\n| |\n| / \ \n|\n_")

Profile icon
Kirit0

Nice game. Maybe try doing something with the lines? they make the puzzle harder to read

Profile icon
DominicHuieWhit

nice

Profile icon
RemyBozung
Profile icon
theknightD2

Nice😀

Profile icon
RemyBozung
Profile icon
theknightD2
Profile icon
RemyBozung

Hey guys! The V2 is out with difficulty chooser, random word api, and lots of fixed bugs! https://repl.it/talk/share/Hangman-V2/60159 Love you guys!

Profile icon
userSM

You should make all those lists in a function in another python file and import them to the main one, because I can just see the answers in the code

Profile icon
RemyBozung

@userSM Yeah the V2 that I'm working on gets an api for a random word.

Profile icon
010

cool

Profile icon
bellevuebear

nice way better than my hangman

Profile icon
201600678G

I guessed once, and the game ended. I still like the game though! I looked into the code, there are a lot of words I could guess.

Profile icon
Pizzaz4me

cool game, but you probably shouldn't leave all the answers on the top of the repl. That's how I got my answer

Profile icon
theknightD2

I won too! This is fun :)

Profile icon
RobertIngham

a

Profile icon
JAPNEET999

very nice
you did a good job making it

Profile icon
LeoXu2

helo peeps check out mine as well!

https://hangman.leoxu2.repl.run/

Profile icon
BriannaBoone

Great Job! I know it can be difficult to make these cool programs so it is great you made this one! I played it multiple times :D

Profile icon
RahulChoubey1

I g l i t c h e d

Profile icon
SeamusDonahue

hmm
this happens if I just hit enter

Traceback (most recent call last): File "main.py", line 71, in <module> noshows.remove(guess) ValueError: list.remove(x): x not in list
Profile icon
RemyBozung

Hey people! Thanks for all of the love on my project :) I realize that the spacing is confusing and when I first built this in pycharm the letter spacing was different on the _. When I imported it to repl though it connects them all like this _______ so you can't actually see how many letters it is. If you have a character that would work better as a placeholder that would be amazing! Again, Thanks for the support as this is one of my first ones. I might be making a V2 soon that should fix most of the bugs and add turtle hangman figures (Does turtle work in repl?).

Profile icon
codingmaster123

Very nice game, looks really confusing.