A simple Python Game..

Source Code:

attemp=int(input("Enter Attempts:")) no_attept=attemp guessContainer="Harshwardhan" while attemp > 0: guessword=input("Guess Character:") failed=0 if guessword in guessContainer: print("Correct Guess") else: print("Incorrect Guess") failed=failed + 1 attemp=attemp-1 if failed > no_attept/2: print("You failed..") else: print("you won")

Output:

 

Comments

Popular posts from this blog

Introduction to Python.

Decision Making Statement.