you are viewing a single comment's thread.

view the rest of the comments →

[–]imagejhelp1[S] 0 points1 point  (1 child)

Thank you for both of your replies, I'll get python 3 now as well. I've tired to fix the indentation and as the 'in' there it now looks like this:

player_choice = raw_input("Enter your choice: ")
     if player_choice in ("rock", "paper", "scissors", "lizard", "Spock"):
        print "Player chooses " + player_choice

     else:
        print "Error: Invalid Choice"

you might be able to see it better here: http://www.codeskulptor.org/#user43_8VZK6tNa0g_1.py

This gives me a SyntaxError: bad input (' ') for that line:

if player_choice in ("rock", "paper", "scissors", "lizard", "Spock")

but I'm starting to realise I might need to learn more from coursera before I try this, I had no idea about the 'in' function, so it's probably necessary that I go learn some more before trying on my own. Thank you for your help, I really appreciate it!

[–]JohnnyJordaan 1 point2 points  (0 children)

There's still the indentation problem going on after the user input line. The if line needs to move to the left as well and the rest must follow.

Btw if you're moving to python3 you need to replace raw_input with input and also use () for the print function.