Q:

What is Wrong with this Code?(Python test Project)

I made python code with windows 10. It keeps restarting and not showing anything. 
Please help. 
This issue keeps happening. I have restarted the ide and have tried using an online ide. Any information that can help or fix this problem will help greatly. 
import time
global apples
global gold
apples = 0
gold = 0

def start():
    print "Hello"
    print "My name is Jason"
    name = raw_input("What is your Name?")
    print "Welcome "+name+"."
    print "The object of this game is to pick apples and sell them for gold."
    time.sleep(1)
    begin = raw_input("Would you like to play?")
    print "Y or N"
    if begin == "Y":
        time.sleep(1)
        begin()
    if begin == "N":
        print "Okay, Please exit the terminal."
        print "Goodbye!!!"
def begin():
    papple = raw_input("Would you like to Pick some Apples?")
    print "Y or N"
    if papple == "Y":
        time.sleep(1)
        apples=apples+5
        print "Computer: You picked 5 apples."
        print "You now have "+apples+"!!!"
        begin()
    if papple == "N":
        sell = raw_input("Would you like to sell some apples for gold?")
        print "Y or N"
        if sell == "Y":
            time.sleep(1)
            gold=gold+5
            apples=apples-5
            print "Computer: You sold 5 Apples for 5 Gold."
            print "You now have "+apples+" apples, and "+gold+" Gold Pieces."
            begin()
        if sell == "N":
            print "Okay"
            begin()

A:

I don't see anything that would start a function. Try adding 
if __name__ == '__main__':
    start()

Also loads of other mistakes. Full code if you don't want to learn by slowly debugging yourself:
import time
apples = 0
gold = 0

def start():
    print "Hello\n"
    print "My name is Jason\n"
    name = raw_input("What is your Name?\n")
    print "Welcome %s.\n" % name
    print "The object of this game is to pick apples and sell them for gold.\n"
    time.sleep(1)
    begin = raw_input("Would you like to play?\nY or N\n")
    if begin == "Y":
        time.sleep(1)
        beginfunction()
    if begin == "N":
        print "Okay, Please exit the terminal.\n"
        print "Goodbye!!!\n"
def beginfunction():
    global apples
    global gold
    papple = raw_input("Would you like to Pick some Apples?\nY or N\n")
    if papple == "Y":
        time.sleep(1)
        apples=apples+5
        print "Computer: You picked 5 apples.\n"
        print "You now have %s apples!!!\n" % apples
        beginfunction()
    if papple == "N":
        sell = raw_input("Would you like to sell some apples for gold?\nY or N\n")
        if sell == "Y":
            time.sleep(1)
            gold=gold+5
            apples=apples-5
            print "Computer: You sold 5 Apples for 5 Gold.\n"
            print "You now have '%s' apples, and '%s' Gold Pieces.\n" % (apples, gold)
            beginfunction()
        if sell == "N":
            print "Okay\n"
            beginfunction()

if __name__ == "__main__":
    start()

