I find getting input with python 2 works well using raw_input as taught at Codecademy. With python 3 its input() function works well. There was a problem accessing strikes and points which should be declared global in main() and it may be better to put a and b into main() so users re-roll the dice when main() reruns itself otherwise they get stuck with the same roll that either terminates in 3 plays or never terminates. The if-then logic can use some fixing so that a "n" answer terminates the game as suggested below along with some other changes such as formatting the initial message so it doesn't print beyond a normal sized window:
import random
points = 0
strikes = 0
def main():
a = random.randint(1, 6)
b = random.randint(1, 6)
global points
global strikes
print """Welcome to the two dice game. Depending on the result
you will earn a point or a strike. Three strikes end
the game. Good luck!"""
answer = raw_input('Play? y for yes, n for n: ')
if answer == "y":
print a
print b
if a == b:
print ("Congrats! You earned a point!")
points = points + 1
main()
else:
print("That's a strike...")
strikes = strikes + 1
if strikes == 3:
print("That's three strikes, game over.")
exit(1)
else:
main()
elif answer == "n":
print ("Game over. You earned this many points.")
print points
main()
It may be interesting to offset strikes with points by calculating strikes as strikes -= points and on termination with "n" to offset points with strikes with points -= strikes.
Codecademy has free all hands-on training for Python 2. I recently went through it and its good. For Python 3, Introducing Python by Bill Lubanovic is excellent because it starts at a beginners level and progresses to intermediate expertise, is very readable, has exercises at the end of chapters with solutions in an appendix and code on github and its relatively short compared to some Python tomes (Learning Python and Programming Python for example) -- it covers core Python 3 in 7-9 chapters in 200-250 pages and the rest are on more specialized and optional but interesting areas such as NoSQL database access, web services and style.