Hi. I'm a python noob who codes for fun, so please only critize me if you're trying to help.
I'm on python 2.7 and built this code for fun. (dont ask what the questions are mean. its private info)

``````    Start = True
while Start:
print "Would you like to play the question game? (y/n) "
if raw_input() == "n":
Start = False
if raw_input() == "y":
foo = ["y", "n"]
from random import choice
q = choice(foo)
if q == "y":
yfoo = ["Are sabas eyes grey?", "Is oz's girlfriend's hair brown(ish)?", "Did abba and imma used to live on the floor below Iris?"
**print** choice(yfoo), "(y/n?)"
Fail = True
Fail = True
if q == "n":
nfoo = ["Are Oz and Roi going to the army next mounth?", "Is Andrew's sister named Sarah?", "Was Saba born in Israel?"]
print choice(nfoo), "(y/n)"
Fail = True
Fail = True
if Fail = True:
repeat = True
while repeat:
print "You lose!"
if raw_input("Play again? (y/n) ") == "n":
repeat = False
``````

The bold is where I get this error:
theres an error in your program: invalid syntax

I don't understand what the problem could be; it looks fine to me.
I WISH TO LEARN!!!!!!!

3
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by pyTony

2 problems:

line 11 the list yfoo needs to end with a ]

line 26 needs to be if Fail == True:

Edited by Ene Uran

line 26 needs to be if Fail == True:

Or simply

``````if Fail:
``````
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.