You'll want a while
loop.
Times = 0
while True:
answer = raw_input("Please enter the capital of Canada")
if answer == "Ottawa":
print "good you made " + str(Times) + " attempts"
print "you know Canadian Geography"
else:
Times = Times + 1
print "Please take another Canadian Geography course."
This will create an infinite loop, so you might want some stopping criteria, like if the user answers incorrectly 10 times.
Times = 0
StopTimes = 10
while True:
answer = raw_input("Please enter the capital of Canada")
if answer == "Ottawa":
print "good you made " + str(Times) + " attempts"
print "you know Canadian Geography"
else:
Times = Times + 1
print "Please take another Canadian Geography course."
if Times > StopTimes:
break