import random print("Let's Play Hangman!! ") print("You Have Only 6 Lives.So Try To Guess The Word With In 6 Attempts.Good Luck!! ") list_fruits=["apple","banana","orange","strawberry","grape","pineapple","kiwi","mango","watermelon","papaya"] random_fruit=random.choice(list_fruits) length=len(random_fruit) list_1=[] count=1 chances=10 k=0 i=0 for i in range(length): list_1.append('_') print(list_1) while chances!=0: if chances==0: break if k==length: break letter=input(" Guess a Letter: ") for j in range(length): if random_fruit[j]==letter: if list_1[j]=='_': list_1[j]=letter i=1 print(list_1) k=k+1 if count==1: print(""" _________ | | | | | | |______________ """) elif count == 2: print(""" _________ | | | O | | | |_____________""") chances=5 elif count == 3: print("""_________ | | | 0 | | | | |_____________""") chances=4 elif count == 4: print("""_________ | | | 0 | /| | | |_____________""") chances=3 elif count == 5: print("""_________ | | | O | /|\\ | | |_____________""") chances=2 elif count ==6: print("""_________ | | | O | /|\\ | / | |_____________""") chances=1 elif count == 7: print("""_________ | | | O | /|\\ | / \\ | |_____________""") chances=0 print("You Loose The Game Better Luck Next Time") if i == 1: i=0 break if letter not in list_1: count=count+1 print(f"You Gussed {letter} That Is Not Present In The Word.so you lose a life") if count == 2: print("""_________ | | | O | | | |_____________""") chances=5 elif count == 3: print("""_________ | | | O | | | | |_____________""") chances=4 elif count == 4: print("""_________ | | | 0 | /| | | |_____________""") chances=3 elif count == 5: print("""_________ | | | O | /|\\ | | |_____________""") chances=2 elif count == 6: print("""_________ | | | O | /|\\ | / | |_____________""") chances=1 elif count == 7: print("""_________ | | | O | /|\\ | / \\ | |_____________""") chances=0 print("You Loose The Game Better Luck Next Time") if k==length or chances!=0: print("You won the match") else: print("byyy") Mam I developed my own code check it once mam😊😊
@khazimahjavaid630711 ай бұрын
Great job.
@cugansteamid62529 күн бұрын
thanks for explaining the game
@chamara854 Жыл бұрын
Your explanation is imazine 🌊
@manfredmasiko4444 Жыл бұрын
Helpful indeed 🙏
@beking2532 Жыл бұрын
Apko dekh ne hi ate h ❤
@ravitejanarala327 Жыл бұрын
Beautiful ❤
@AmnaRajnaz4 ай бұрын
Different days-different hairstyles ❤🤩
@Ashwinkotturu4 ай бұрын
Good observation
@Steven-ez6qp6 ай бұрын
Hi ❤ Hangman Such a nice Fun game I like to let my niece win and She says Yesss lol I got to Hang the mean men 😵 lolol HA HA Soo cute 🥰
@-vijayKumar-oc5fb Жыл бұрын
Thank you
@jillakirthan858 Жыл бұрын
Super super explanation ma'am
@DARK_RYZEN Жыл бұрын
print("let's play hangman") word=len("apple") words=("apple") for i in range(word): print("_",end=" ") print(" ") print(f"the word containing {word} you have 6 lives to guess word") for i in range(6): enter = str(input("enter your input word")) if words==enter: print("you made it perfectly") break else: print("you got hanged")
@ramjimishra5511 Жыл бұрын
Mam please🙏 interview preperation ki playlist bna do bhot helpful rhegi kahi bhi nhi milti please🙏🙏🙏🙏🙏🙏
@glps369 Жыл бұрын
Thank You So Much
@AmitKumar-ts2pi Жыл бұрын
Pattern design plzxz😮😊
@jeethusingh3145 Жыл бұрын
Thank you so much mam ❤
@rongalamanindra5279 Жыл бұрын
Thank you mam
@shubhampatil9221 Жыл бұрын
Hello mam , please provide google drive link for all the notes of python series
@vijayramakrishnan6838 Жыл бұрын
Mam what is system flow chart can u plz explain and what is the difference. a videio will be better.
@Rakhu-e2f Жыл бұрын
I think you should teach how to make this game in C++ using SFML or raylib instead of python ..C++ is best choice for game development
@koteswararaopeddiboyina261710 ай бұрын
we want tic tac toe game using python 🤞🤞
@BishalSaha-xo4mx Жыл бұрын
Can I get to see that hangman_stages.py file to know how you have worked with that figure in later video