Share your repls and programming experiences

← Back to all posts
Hangman in python
RemyBozung (66)

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 :)

Comments
hotnewtop
RemyBozung (66)

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

OldWizard209 (1498)

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.

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.

Other than that cool game!!!! Nice Job @RemyBozung. Keep it up

RemyBozung (66)

@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.

Alice688 (104)

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.

AustinZhang1 (65)

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.

Secondly, you should improve this:

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

RemyBozung (66)

@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?

RahulChoubey1 (172)

@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.

TheHappyShow10 (1)

Very nice I'm impressed!

Muffinlavania (1528)

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

miralegotsmart (9)

Interesting, looks amazing.

UCYT5040 (16)

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")
TheHappyShow10 (1)

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

TheHappyShow10 (1)

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

Bigbodyboy21 (24)

@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_")

Kirit0 (34)

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

RemyBozung (66)

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!

userSM (258)

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

RemyBozung (66)

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

bellevuebear (1)

nice way better than my hangman

201600678G (0)

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.

Pizzaz4me (63)

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

theknightD2 (1)

I won too! This is fun :)

JAPNEET999 (0)

very nice
you did a good job making it

BriannaBoone (0)

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

SeamusDonahue (457)

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
RemyBozung (66)

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?).

codingmaster123 (16)

Very nice game, looks really confusing.