Okay. First thing is that you use input incorrectly. In python input is a function so instead of
answer = input
you should do
answer = input()
and since you want to print a question to the player you might as well do
answer = input("Would you like to play a game? Y/N")
which will do the same thing as you intended it to. Also - importing random is unnecessary in your code.
Second thing is I don't understand what you wanted to do with this main function. If you wanted a main fuction as in C or C++ for example then you should know that in python this is not needed. Although in some cases (like writing modules) you might want to do
if __name__ == "__main__":
main()
while having your main function defined before this or every instruction you want to be executed be placed inside that if statement.
In case this wasn't what you intended then your revised code should look like this
def play():
print('''You are playing the game with Ralph.
He holds up his hand, in a fist.
He then sticks out his thumb
Ralph: This is monkey
He then sticks out his pointer finger, two of his fingers out
Ralph: This is one
He sticks out his middle finger, three of his fingers out
Ralph: This is two
He sticks out his ring finger, four of his fingers out
Ralph: This is three
He sticks out his pinky, all of his fingers out
Ralph: This is 4''')
print("please come play again")
answer = input("Would you like to play a game? Y/N \n")
if answer == 'Y':
play()
or this
answer = input("Would you like to play a game? Y/N \n")
if answer == 'Y':
print('''\nYou are playing the game with Ralph.
He holds up his hand, in a fist.
He then sticks out his thumb
Ralph: This is monkey
He then sticks out his pointer finger, two of his fingers out
Ralph: This is one
He sticks out his middle finger, three of his fingers out
Ralph: This is two
He sticks out his ring finger, four of his fingers out
Ralph: This is three
He sticks out his pinky, all of his fingers out
Ralph: This is 4''')
print("\nplease come play again")