#nalin #this is a game that lets players player1=input("What is player one's name?") player2=input("What is player two's name?") print("Player 2 look away.") celeb1=input("Player 1, input a celebrity.") celeb2=input("Player 1, input a celebrity.") celeb3=input("Player 1, input a celebrity.") print(50*"\n") enceleb1="__"+celeb1[2:-3]+"___" enceleb2="__"+celeb2[2:-3]+"___" enceleb3="__"+celeb3[2:-3]+"___" amountCorrect=0 answer1=input("Who is this,"+ str(player2)+"?"+str(enceleb1)) if answer1==celeb1: print("Congrats, you got it right "+ str(player2) +".") amountCorrect+=1 else: print("Gosh darn it, you got it wrong "+str(player2)+".") answer2=input("Who is this,"+ str(player2) +"?"+str(enceleb2)) if answer2==celeb2: print("Congrats, you got it right "+ str(player2) +".") amountCorrect+=1 else: print("Gosh darn it, you got it wrong "+str(player2)+".") answer3=input("Who is this, "+ str(player2) +"?"+str(enceleb3)) if answer3==celeb3: print("Congrats, you got it right "+str(player2) +".") amountCorrect+=1 else: print("Gosh darn it, you got it wrong "+str(player2)+".") score=(amountCorrect/3)*100 if score>0.5: print("Congrats, you got",score) else: print("You got",score)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question