import random
import sys
print ("hi")
enter = "Please press Enter to continue!"
print ("Hello! welcome to the Ninja Master Gordon number Guessing game!")
print ("Please Guess the Black Ninja clan's number between 1 - 100!")
computernum = random.randint (1,1)
Guess1 = input("My First Guess Is: ")
if Guess1 == computernum:
print ("You have defeated the Black Ninja Clan! you are a WINNER!!!")
input (enter)
sys.exit(0)
else:
print ("sorry, please try again")
print ("YOU HAVE ONLY TWO GUESSES REMAINING!")
Guess2 = input ("My second Guess Is: ")
if Guess2 == computernum:
print ("You have defeated the Black Ninja Clan! you are a WINNER!!!")
input (enter)
sys.exit(0)
else:
print ("sorry , please try again")
print ("YOU HAVE ONLY ONE GUESS LEFT make it count...")
Guess3 = input ("My Final Guess Is: ")
if Guess3 == computernum:
print ("You have defeated the Black Ninja Clan! you are a WINNER!!!")
input (enter)
sys.exit(0)
else:
print ("YOU LOST AT THIS GAME!!! but dont let the Diamond Ninja Force down have another GO!")
computernum = str(computernum)
print ("The Black ninja clan's number was "+computernum)
input (enter)
sys.exit (0)
Its impossible to win and I cant find the error I thinks its because of the == section and Im using python 3.3
This post has been edited by Simown: 08 October 2012 - 01:41 PM
Reason for edit:: USE CODE TAGS!

New Topic/Question
Reply


MultiQuote



|