Above is the program spec.
and below is what I did so far.
numStr = raw_input("'p' to be prompted for the secret number or 'g' to have it generated: ") p = numStr print print true = p while true: secret = raw_input("Enter the 'secret' number (five digits, no duplicates):") if secret.isdigit() == True: if len(secret) != 5: print 'Secret number must contain 5 digits. Try again.' print continue else: check = 1 for dig in secret : if dig in secret[check:5]: print 'Your secret number cannot have duplicate number. Try again.' continue check += 1 print print print 'Secret number was successfully entered' n = 10 print 'The user will be permitted', n, 'guesses' print while true: numStr1 = raw_input("Enter a 5-digit guess (or 'q' to quit the game):") gues = numStr1 x = gues if gues.isdigit() == x: if len(gues) != 5: print 'The guess must be a 5-digit number. Guess again.' elif gues == secret: print 'Congratulations, you correctly guessed the secret number' print 'Thanks for playing. Try again later!'
I know some parts are like weird and I just don't get it.
As a python newbie, it's really hard figuring out stuff with no prior programming background or experience, but I am really interested in programming. I would really appreciate you guys' help.