Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
sheru
import random list=["sheru","kanya"] word=random.choice(list) print("random generated word is",word,"\n") print("enter your name\n") name=input() print("good luck",name,"bhai\n") print("guess any character") guess=input() def func1(word,guess): if guess[0]==word[0]: print("\nchar found at",word[0],"_ _ _ _") elif guess[0]==word[1]: print("\nchar found at","_",word[1],"_ _ _") elif guess[0]==word[2]: print("\nchar found at","_ _",word[2],"_ _") elif guess[0]==word[3]: print("\nchar found at","_ _ _",word[3],"_") elif guess[0]==word[4]: print("\nchar found at","_ _ _ _",word[4]) else: print("\nchar not found") func1(word,guess) print("enter next char") guess1=input() guess=guess1 func1(word,guess) print("enter next char") guess2=input() guess=guess2 func1(word,guess) print("enter next char") guess3=input() guess=guess3 func1(word,guess) print("enter next char") guess4=input() guess=guess4 func1(word,guess) """if guess[0]==list print("word found") else: print("not found") challenge(word,guess,list) """
run
|
edit
|
history
|
help
0
Hey
shuru8
Factorial
list_copy_shallow_deep.py
111
abc1
PyQP
Bmi calculator dictionary
Assignment-3a
probl2_203700377