Тёмный

Simple Hangman Game with ASCII Graphics 

TokyoEdtech
Подписаться 47 тыс.
Просмотров 5 тыс.
50% 1

DOWNLOAD THE CODE HERE: github.com/wynand1004/Project...
A simple hangman game using old-school ASCII graphics. Enjoy!
NEED HELP?
🆘 Watch this first and then let me know in the comments below: • Help Me Help You
❤️❤️ SHOW SOME LOVE AND SUPPORT THE CHANNEL ❤️❤️
Click Join and Become a Channel Member Today!
Channel members can get preferential comment replies, early access to new content, members only live streams, and access to my private Discord.
❤️ / @tokyoedtech
Amazon Affiliate Links
💻 My Laptop (Asus Zenbook 13): amzn.to/2H3DLbF
🎙My New Microphone (Blue Yeti Pro): amzn.to/2HmjOgN
🎙My Old Microphone (Blue Snowball): amzn.to/3j8magh
🎶My USB Interface (Focusrite Scarlett Solo): amzn.to/3kqyo5m
Other Affiliate Links
⭐ Kite is a free AI-powered coding assistant that will help you code faster and smarter. The Kite plugin integrates with all the top editors and IDEs to give you smart completions and documentation while you’re typing. www.kite.com/get-kite/?...
LINKS
🗄️ GITHUB: github.com/wynand1004
💬 Follow me on Twitter: / tokyoedtech
📜 Subscribe to my Newsletter: eepurl.com/dKgM8k
📝 Check out my Blog: christianthompson.com
⬇️ Download Geany Editor: www.geany.org
LEARN MORE PYTHON
➡️Space Invaders: • Python Game Programmin...
➡️Snake Game: • Python Game Programmin...
➡️Pong: • Python Game Programmin...
➡️Space War: • Python Game Programmin...
➡️Intro to Python (for Java Coders): • Intro to Python for Ja...
➡️Space Arena - The Ultimate Python Turtle Graphics Game Tutorial: • Ultimate Python Turtle...
LEARN MORE JAVA
➡️Basic Java for Beginners: • Basic Java 1&2: Commen...
➡️Intro to AP Computer Science A: • AP Computer Science Un...
#Python #Tutorial #Beginner

Наука

Опубликовано:

 

16 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 86   
@first_name_last_name4560
@first_name_last_name4560 3 года назад
Hey Christian, I just want to say that you’re one of my favourite youtubers, you always make fantastic, clear, easy to follow content. you’re so underrated, I hope your channel will continue go grow. Also it’s great that you always reply quickly to all comments, even my schools teachers find it hard to do so lol. Thanks again
@TokyoEdTech
@TokyoEdTech 3 года назад
Thanks, someone! I try my best! The channel has already grown far beyond my expectations, but I would like to see how far I can continue. I try to keep up with comments, but it is a challenge sometimes. Keep on codin'!
@astastaria811
@astastaria811 3 года назад
You helped me so much You are an amazing content creator by the way
@TokyoEdTech
@TokyoEdTech 3 года назад
I appreciate that!
@ethansofiadada
@ethansofiadada 3 года назад
I loved playing this game with my students in Korea, though I obviously had to leave out the hanging bit. They would have loooved this version! This was a fun tutorial, and it was great to see you use the console for the first time since Tic-Tac-Toe! Thanks to your awesome teaching, I was able to guess some of the coding you would put in, though you obviously floored me with the temp code from which I am now recovering. ;) "Keep on codin'!"
@TokyoEdTech
@TokyoEdTech 3 года назад
Glad you liked the temp thing - it's not uncommon to use a temp variable in certain situations. I probably could have done the program without it, but it would have been more complicated and the students simply aren't ready for that yet. Keep on codin'!
@ethansofiadada
@ethansofiadada 3 года назад
@@TokyoEdTech Nor probably am I. One step at a time. And always something new around the corner. Quarter-impulse ahead!
@basementuser
@basementuser 3 года назад
Christian I just gotta say I've been watching your channel for about 2 years and you've been the best programming teacher I've ever had. You've inspired me to learn more about python and programming in general, and your turtle module tutorials make programming look fun and easy. Keep up the good work!
@TokyoEdTech
@TokyoEdTech 3 года назад
Wow - Thanks so much! I really appreciate that! Keep on codin'!
@ethankempster7777
@ethankempster7777 3 года назад
Same you are the greatest coding teacher that I have found on RU-vid thanks so much I have made your snake and the maze game that you made for a video
@TokyoEdTech
@TokyoEdTech 3 года назад
@@ethankempster7777 Thanks - also very much appreciated! I don't know if I'm the best (Corey Schafer!), but I do what I can. :)
@ethankempster7777
@ethankempster7777 3 года назад
Christian Corey Schafer is good but so are you keep up the work that you do! Keep up the amazing content!
@TokyoEdTech
@TokyoEdTech 3 года назад
@@ethankempster7777 Cheers!
@tanimapanda4102
@tanimapanda4102 3 года назад
Love it
@TokyoEdTech
@TokyoEdTech 3 года назад
Thanks!
@colwarsstudiobrickfilmandm8580
@colwarsstudiobrickfilmandm8580 3 года назад
Thanks this is so great!
@TokyoEdTech
@TokyoEdTech 3 года назад
Thanks, Col!
@randomguyidk4060
@randomguyidk4060 2 года назад
I remember watching the first video from tokyoedtech and being so excited
@TokyoEdTech
@TokyoEdTech 2 года назад
The good old days!
@randomguyidk4060
@randomguyidk4060 2 года назад
@@TokyoEdTech Yeah
@astastaria811
@astastaria811 3 года назад
Thank you helped a lot
@TokyoEdTech
@TokyoEdTech 3 года назад
You're welcome, Epic.
@shaharyarahmed5777
@shaharyarahmed5777 3 года назад
btw when is the next tutorial for space arena coming out? please finish this series as soon as possible!
@primedestroyer9934
@primedestroyer9934 3 года назад
Yes, I am also waiting!!
@TokyoEdTech
@TokyoEdTech 3 года назад
That one is a monster...sorry it has drug on so long!
@shaharyarahmed5777
@shaharyarahmed5777 3 года назад
@@TokyoEdTech I'll be waiting....
@primedestroyer9934
@primedestroyer9934 3 года назад
@@TokyoEdTech So when's the next part coming?
@TokyoEdTech
@TokyoEdTech 3 года назад
No idea - earliest would be this Sunday. Lots going on!
@creativeshooter428
@creativeshooter428 3 года назад
@Tokyoedtech can you make a video of making pacman by using the turtle module plz.
@TokyoEdTech
@TokyoEdTech 3 года назад
Try watching my dungeon maze tutorial - it can easily be adapted to Pacman (some of my students have done so). ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-inocKE13DEA.html
@creativeshooter428
@creativeshooter428 3 года назад
@@TokyoEdTech OK
@justsomepikachu8218
@justsomepikachu8218 3 года назад
@TokyoEdTech When will you be able to teach how to make the aliens shoot in space invaders?
@TokyoEdTech
@TokyoEdTech 3 года назад
Not sure - just busy busy busy!
@tomk3682
@tomk3682 3 года назад
I am assuming if you use an ontimer function with a enemy.missile function within the game loop, that should work.
@TokyoEdTech
@TokyoEdTech 3 года назад
@@tomk3682 That would probably do it. Or just keep dropping missiles one at a time.
@shaun_was_taken9135
@shaun_was_taken9135 3 года назад
Hey, is there anyway easy way to detect collision on turtle, for example I don’t want my player to run through the wall?
@TokyoEdTech
@TokyoEdTech 3 года назад
There is no built in method - you need to roll your own.
@shaun_was_taken9135
@shaun_was_taken9135 3 года назад
@@TokyoEdTech is it possible that you can make a video on it? It would be super helpful!
@TokyoEdTech
@TokyoEdTech 3 года назад
@@shaun_was_taken9135 If you watch my Maze Game Tutorial, I show one way to accomplish this.
@shaharyarahmed5777
@shaharyarahmed5777 3 года назад
For your geany problem why don't you use the Ubuntu terminal to execute your programs. Whenever I use F5 geany automatically runs the program in the Ubuntu terminal.
@TokyoEdTech
@TokyoEdTech 3 года назад
Thanks. That's an option. I just prefer to have it all in one window so I'm not dealing with a million popups all the time.
@shaharyarahmed5777
@shaharyarahmed5777 3 года назад
TokyoEdTech instead of CTRL-Z how about you try CTRL-C and see if the problem occurs.
@kallearollins806
@kallearollins806 3 года назад
Hi!!! I am getting this error Traceback (most recent call last): File "", line 10, in elif guess[index] != "_": IndexError: string index out of range I followed and tested as I was going, I am very confused as to why I am getting this error, I would love the help!
@kallearollins806
@kallearollins806 3 года назад
# Hangman >>> # By Kallea Rollins >>> # Python >>> import os >>> os.system("cls") 0 >>> import random >>> # Initialize >>> words = ["RAINBOW", "BUNNY", "PYTHON", "GAMER", "ANIME", "AVATAR", "COMPUTER"] >>> word = random.choice(words) >>> guess = "-" * len(word) >>> wrong_letters = "" >>> # Print header >>> print("HANGMAN ") HANGMAN >>> print(""" ---------------- | | | | | |---------""") ---------------- | | | | | |--------- >>> # Main game loop >>> while True: print(f"Current Guess: {guess}") print(f"Wrong Guesses: {wrong_letters}") letter = input(" Please enter a letter. > ").upper() if letter in word: temp = "" for index in range(len(word)): if letter == word[index]: temp += letter elif guess[index] != "-": temp += guess[index] else: temp += "-" guess = temp else: wrong_letters += letter # Check for a winner if word == guess: print("You win! and you live to play another day!") print(""" O \\|/ | / \\""") exit() #print the hangman if len(wrong_letters) == 0: print(""" ------- | | | | | |---------""") if len(wrong_letters) == 1: print(""" ------- | O | | | | |---------""") if len(wrong_letters) == 2: print(""" ------- | O | | | | | | |---------""") if len(wrong_letters) == 3: print(""" ------- | O | \\|/ | | | | |---------""") if len(wrong_letters) == 4: print(""" ------- | O | \\|/ | | | / \\ | |---------""") if len(wrong_letters) == 5: print(""" ------- | | | O | /|\\ | | | | | |---------""") #check for a loser if len(wrong_letters) == 5: print("You lose! Sorry!!") print(f" The word was {word}") exit() Here is my code!
@TokyoEdTech
@TokyoEdTech 3 года назад
Hi There. You need to use an editor, not the interactive shell.
@abhavjain9363
@abhavjain9363 3 года назад
1st
@noobcraft5712
@noobcraft5712 3 года назад
whattttttttttt
@TokyoEdTech
@TokyoEdTech 3 года назад
Gold!
@arnavkatepallewar1771
@arnavkatepallewar1771 3 года назад
Good Work!! Btw, instead of printing the shapes manually, let's print it using for loop? - just an advice :)
@TokyoEdTech
@TokyoEdTech 3 года назад
Thanks - what did you have in mind for the printing?
@mister.e4452
@mister.e4452 3 года назад
is geany required?
@TokyoEdTech
@TokyoEdTech 3 года назад
Nope, you can use any editor.
@kendallpinto2611
@kendallpinto2611 3 года назад
Hi, Thanks for the great tutorial. I want to put some words above 15 characters and even though I got all the letters it's not popping up the you win messege, it still let's me put more letters, Can you please help me, I think I need to add an extra line.
@kendallpinto2611
@kendallpinto2611 3 года назад
@tokeyoedtech I also want it to reset the program after they win if they press a, please can you give me the code for doing that on windows. Thanks
@TokyoEdTech
@TokyoEdTech 3 года назад
Check the link that says "NEED HELP?" and get back to me.
@TokyoEdTech
@TokyoEdTech 3 года назад
I think this is something you should figure out on your own - it will only take an input statement, an if statement, and a couple more lines of code.
@kendallpinto2611
@kendallpinto2611 3 года назад
@@TokyoEdTech - My code is here - pastebin.com/gDXviwkQ - words like diary of a wimpy kid even if i put all the characters in it doesn't display the you win message
@kendallpinto2611
@kendallpinto2611 3 года назад
@@TokyoEdTech - I'm not so good at doing this kind of stuff, it would be great if you could help me, also my code only doesnt work for some words like i mentioned heres my code - pastebin.com/gDXviwkQ
@noobcraft5712
@noobcraft5712 3 года назад
2nd
@abhavjain9363
@abhavjain9363 3 года назад
you are second
@TokyoEdTech
@TokyoEdTech 3 года назад
Silver!
@shaharyarahmed5777
@shaharyarahmed5777 3 года назад
3RD
@TokyoEdTech
@TokyoEdTech 3 года назад
Bronze!
@aditgaur1585
@aditgaur1585 3 года назад
Way to fix that Geany Error: Use VS Code :D
@TokyoEdTech
@TokyoEdTech 3 года назад
Great advice! Haha
@aditgaur1585
@aditgaur1585 3 года назад
Lol
@SkyFly19853
@SkyFly19853 3 года назад
So, you have used random() function? 🤔
@TokyoEdTech
@TokyoEdTech 3 года назад
Something like that!
@SkyFly19853
@SkyFly19853 3 года назад
@@TokyoEdTech Random() function is one of most important functions for randomize the possibilities and how the game makes you believe it's real...
@TokyoEdTech
@TokyoEdTech 3 года назад
@@SkyFly19853 Indeed!
@SkyFly19853
@SkyFly19853 3 года назад
@@TokyoEdTech Yes, so much so. ✅✅✅✅✅✅
@LammiSalami
@LammiSalami 3 года назад
i am serching the enter internet for a pyton project and i can't find one . LOL
@TokyoEdTech
@TokyoEdTech 3 года назад
I've got tons on my channel. Enjoy!
@LammiSalami
@LammiSalami 3 года назад
@@TokyoEdTech lol
Далее
Simple Calculator App Tutorial in Python for Beginners
34:01
Coding Challenge 166: ASCII Text Images
22:42
Просмотров 1,1 млн
The Most Legendary Programmers Of All Time
11:49
Просмотров 535 тыс.
Simulating the Evolution of Rock, Paper, Scissors
15:00
100+ Linux Things you Need to Know
12:23
Просмотров 772 тыс.
Shoot'em - 3D ASCII game
2:47
Просмотров 87 тыс.
Python Game Tutorial: Minesweeper Basic Game Functions
57:54