Creating A Simple Hangman Game in Python

Поделиться
HTML-код
  • Опубликовано: 24 окт 2024

Комментарии • 85

  • @shingo371
    @shingo371 3 года назад +11

    i bit late maybe but i love how u make these quite easy to understand tutorials!

  • @elpython3471
    @elpython3471 3 года назад +1

    "Alright so I don't think that I need to explain the basic hangman rules to you, but essentially..."
    *explains the rules of hangman*
    XD

  • @Svarcolaci
    @Svarcolaci 3 года назад +5

    I love your channel! Thanks to you
    I started to learn programming again after a long break.

    • @graphitic5578
      @graphitic5578 3 года назад +1

      how's everything going after 10 months. are you now creating graphics, i'm ecstatically curious.

  • @onesocktoobig
    @onesocktoobig Год назад +2

    How do you remove the word from the list once its used? I tried methods for both strings and lists and neither work.

  • @hi.____.
    @hi.____. 7 месяцев назад +1

    1:35 and add Uppercase:)

  • @sowmiyabaskar6581
    @sowmiyabaskar6581 2 года назад +3

    Kudos, really easy to follow the code!

  • @ahmedrobi6507
    @ahmedrobi6507 4 года назад +20

    do some advance programmes, would love to learn

    • @NeuralNine
      @NeuralNine  4 года назад +13

      i have made some in the past and I will make more in the future :)

    • @ahmedrobi6507
      @ahmedrobi6507 4 года назад +2

      @@NeuralNine i hae seen all of them already

    • @ahmedrobi6507
      @ahmedrobi6507 4 года назад +1

      have

    • @googleaccount7252
      @googleaccount7252 3 года назад +1

      @@ahmedrobi6507 Ahmed I hope you're doing ok, where you from?

    • @ahmedrobi6507
      @ahmedrobi6507 3 года назад +3

      @@googleaccount7252 yeah im completely fine buddy

  • @animatnetic2545
    @animatnetic2545 3 года назад +2

    Sorry, I have a question why would you use end=" " in the code?

    • @guillermoalonso1420
      @guillermoalonso1420 3 года назад +1

      It is used to don’t do automatically
      at the end of the print, which is set by default. Here it is necessary as we want to display the word letter by letter in the same line.

    • @animatnetic2545
      @animatnetic2545 3 года назад +2

      @@guillermoalonso1420 Thanks mate, this helped a lot.

  • @zogel_mogel
    @zogel_mogel Год назад

    Hey, great tutorial. But I don't know if the variable done was important though. It could be made easier with just True and in the end with all()

  • @sparklingdesire8800
    @sparklingdesire8800 4 года назад +5

    Damn the thumbnail xd

    • @NeuralNine
      @NeuralNine  4 года назад +2

      what about it? ^^

    • @sparklingdesire8800
      @sparklingdesire8800 4 года назад +1

      @@NeuralNine I saw it first before reading the title and I got a bit scared 🤦‍♂️

  • @thirumurugana9972
    @thirumurugana9972 3 года назад +1

    How to give hints for the words ....pls reply

  • @aayush8037
    @aayush8037 3 года назад +1

    I have a bug my game continues to ask for inputs even after i have guessed all the letters

    • @endrernningen3637
      @endrernningen3637 3 года назад +1

      i'm probably late, but i have the same problem

    • @abxgajebrvst
      @abxgajebrvst 2 года назад +1

      @@endrernningen3637 did you ever find a solution?

  • @rishitjain3777
    @rishitjain3777 4 года назад +2

    I would love to see more content on hacking really like it

  • @paulbreetzke1474
    @paulbreetzke1474 3 года назад +1

    du cary
    st mich durch Informatik durch

  • @Kyro_LxG
    @Kyro_LxG 4 года назад

    Love the content man. Hey btw may i know what is the name of the intro song.

  • @01akbarikrunal24
    @01akbarikrunal24 3 года назад

    Hey bro it's hard to understand but thank you you made easy

  • @fati2487
    @fati2487 3 года назад

    i am a bit late here, but i have a mistake in the code. When the user guesses the word, i say "Congratulations! The word was {word}." But when the user does NOT guess the word, it should say "Game Over". Instead, the program still gives "Congratulations ...". Anyone knows what might be the isuue? I checked everything according to the code in the video but still cannot figure it out.

    • @rreynz5460
      @rreynz5460 2 года назад

      yes i had the exact same issue its an easy fix, where it says "while not done: at the very end of that group of code it should end in print(" ") i think he deleted it without showing it in the vid

  • @zahraa10f
    @zahraa10f 2 года назад

    It was a perfect teaching

  • @FT4YOU
    @FT4YOU 3 года назад +1

    Hi i am a beginner, i did this the noob way without looking for any tutorial. What i can't fix is if the matched word is correct until the end then print the winner. Another issue: in the third word if the player types the wrong alphabet the loop goes back to the beginning, it does not ask for the third only. I know this loop looks stupid but i am trying really hard to get this done. You made it look so easy while i did all this :(
    import random
    hangman = True
    tries = 4
    print(f"Welcome to hangman. You start with {tries} health. Try to guess the missing word :)")
    name_list = ['Ford', 'Lamborghini', 'Einstein', 'Pythonista', 'Shopaholic', 'Nurmagomedov', 'Stalin',
    'Tupac', 'Balenciaga', 'Chrysler', 'Felton', 'Hanks', 'Bonnie', 'Hallden', 'Clever']
    alphabetical_order = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
    'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
    computer_choice = random.choice(name_list)
    the_f_a_choice = computer_choice[0]
    guesses = []
    # check_len_word =
    print("The numerical order of the word is", len(computer_choice), "and the first alphabet is... ->", the_f_a_choice,
    "

    • @godza4735
      @godza4735 2 года назад

      how it is going one year after this tutorial?

    • @joeswanson8240
      @joeswanson8240 2 года назад

      give up

  • @alfwareing6970
    @alfwareing6970 3 года назад

    love the channel but wich python are you using?

    • @sleepywithspeed
      @sleepywithspeed 3 года назад +1

      This should work on any python 3 version

  • @fizion3045
    @fizion3045 3 года назад

    everyything but the words = f.readlines() im using spyder can someone tell me if I'm doing anything wrong?

  • @simpleperson98
    @simpleperson98 Год назад +1

    is it possible to do a custom prompt word or phrase rather than a premade one from a list?

    • @curtislevey7639
      @curtislevey7639 2 месяца назад

      At the beginning prompt user for an input, define the 'word' as that input, and then start the game. But if you were making this multiplayer, you'd be able to see the input in the terminal so it wouldn't be very secretive

  • @Simply-retro
    @Simply-retro 3 года назад

    ty vermy much bro love the conttents keep it up

  • @Tiger-zq3ph
    @Tiger-zq3ph 3 года назад +1

    How do I get the python menu on the side bar?

    • @electricz3045
      @electricz3045 3 года назад

      Use Pycharm. Its at the left by default

  • @deltabytes
    @deltabytes 4 года назад +1

    nice one,keep it up and i got a request can you do some tuts about kivy please

    • @NeuralNine
      @NeuralNine  4 года назад

      never really used it so I guess I can't make tutorials on that soon :/

    • @deltabytes
      @deltabytes 4 года назад +1

      @@NeuralNine I will keep waiting if you happen to do them,otherwise i learn a lot from your tuts

  • @jonathanmoas6783
    @jonathanmoas6783 3 года назад

    what about the drawing of the hangman?

  • @anjanit2006
    @anjanit2006 Год назад

    thanks so much bro

  • @LibreLobo
    @LibreLobo 3 года назад

    Awesome 👍! Thank you!

  • @baryalen9669
    @baryalen9669 4 года назад

    Bro please crop in to the screen a bit hard to read code at 480p

  • @dolfinho87
    @dolfinho87 3 года назад

    Nice video! Thanks!

  • @mannaroy1546
    @mannaroy1546 3 года назад

    My error is File "/Users/Bakbakum/PycharmProject/SnakeGame/main.py", line 18
    if guess.lower() not in word.lower():
    IndentationError: unexpected indent

    • @hajardr100
      @hajardr100 3 года назад

      in line 17 the for letter not letters

  • @Mark-lg3to
    @Mark-lg3to 3 года назад

    i have a problem on line 21 it says break is outside the loop

  • @bruhsprinkles5490
    @bruhsprinkles5490 3 года назад

    i need help in line 8 it said syntax error please help me

  • @ayosalau940
    @ayosalau940 Год назад

    Thanks!!!

  • @elevendarter112
    @elevendarter112 3 года назад

    Why do I get this error msg?
    Traceback (most recent call last):
    File " .py", line 17, in
    if guess.lower not in word.lower():
    TypeError: 'in ' requires string as left operand, not builtin_function_or_method

    • @elevendarter112
      @elevendarter112 3 года назад

      Oops..., solved. I forgot to add brackets after "guess.lower". Stupid mistake.

  • @programmerrdai
    @programmerrdai 4 года назад +1

    Great Content

  • @crazyworldgames4248
    @crazyworldgames4248 2 года назад +1

    Thanks 🎮🕶💻

  • @issac4553
    @issac4553 3 года назад

    Do fluid simulation

  • @aprameyamandal4346
    @aprameyamandal4346 3 года назад +1

    Super!

  • @Red_mihiko
    @Red_mihiko 3 года назад

    thx man

  • @mannaroy1546
    @mannaroy1546 3 года назад

    My thing keeps on saying Game Over! Even though I got it right

  • @cocoarecords
    @cocoarecords 3 года назад

    damn love this

  • @iulianalexandrudragan5531
    @iulianalexandrudragan5531 4 года назад

    NiCe GaInZ bRo

  • @rpkkk8096
    @rpkkk8096 4 года назад

    Remember me when you are famous 😄

  • @devil_2823
    @devil_2823 3 года назад

    most of this I havent learnt yet

  • @trivenibangera3685
    @trivenibangera3685 3 года назад

    It is awsome.

  • @karinaganieva130
    @karinaganieva130 3 года назад

    cool

  • @bharatmrk5606
    @bharatmrk5606 3 года назад

    Cool

  • @vipercreed
    @vipercreed 4 года назад

    Next step after coding how we can run that game

  • @mypccontent6273
    @mypccontent6273 2 года назад

    I'm onion and I code

  • @MrSeinfeldFan2
    @MrSeinfeldFan2 3 года назад

    No pictures at all? how boring....

  • @georgewong4453
    @georgewong4453 2 года назад

    好名

  • @zuberkariye2299
    @zuberkariye2299 4 года назад +4

    First