Problem with Python 3.1(syntax error). Im a beginner please help!
Posted
by
Jonathan
on Stack Overflow
See other posts from Stack Overflow
or by Jonathan
Published on 2011-01-17T17:43:27Z
Indexed on
2011/01/17
17:53 UTC
Read the original article
Hit count: 315
python
Hi there, im new to pragraming :) I got a problem with sytax error while making a guessing game. the problem is in (if Gender = boy or Boy), the equal(=) letter is a syntax error. Please help!
Answer = 23
Guess = ()
Gender = input("Are you a boy, a girl or an alien? ")
if Gender = boy or Boy:
print("Nice!", Gender)
if Gender = girl or Girl:
print("Prepare do die!", Gender)
if Gender = alien or Alien:
print("AWESOME my", Gender, "Friend!")
While Guess != Answer:
if Guess < Answer:
print("Too low! try again")
else:
print("too high!"
print("Congratulations you guessed correct!", Gender, "Have fun!"
Thank
© Stack Overflow or respective owner