Python Error TypeError: unsupported operand type(s) for +: 'function' and 'function'
<p>I know there is some stuff online about this error but whatever I try just doesn't seem to fix it. I just started learning Python yesterday and am an absolute beginner so please don't judge my script. It is just a simple script wanting to take the order of a customer from a restaurant and just calculate the total price of the meal. It's pretty cheesy but I would love some help. I can not get my script to calculate the total cost of the meal and whatever I try, it just doesn't work. Could you please tell me what I am doing wrong and how to calculate the total cost of the meal based on what the customer chooses. Also If they pick an item that is not on the menu, the program closes instead of letting them try again. Why? I would greatly appreciate your help. :) THANKS</p>

<p>Here is a picture of the cost error I get when running the script in terminal.
<img src="http://i.stack.imgur.com/Hrst4.png" alt="Error1"></p>

<p>Here is a picture of what I get if I type something that is not on the menu.
<img src="http://i.stack.imgur.com/hVhO5.png" alt="Error2"></p>

<p>Here is my script.</p>

<p>Note, I have aded the items from the menu just to show you what they are and their cost.</p>

<pre><code>    Apple = 3
    Banana = 4
    Kiwi = 2
    Peach = 5
    Hamburger = 12
    Parma = 22
    Steak = 24
    Sandwhich = 10
    Cream = 3
    Cake = 8
    Moose = 2
    Soda = 3
    Beer = 8
    Wine = 12


    def Fruit():
        print("Welcome to The Buttler's Pantery")
        Fruit = raw_input("what fruit would you like today?")

        if (Fruit == "Apple"):
            Main()
        elif (Fruit == "Banana"):
            Main()
        elif (Fruit == "Kiwi"):
            Main()
        elif (Fruit == "Peach"):
            Main()
        else:
            print("Sorry, but it appears that the item you have ordered is not on the menu")

    def Main():
        Main = raw_input("what Main would you like today?")

        if (Main == "Hamburger"):
            Dessert()
        elif (Main == "Parma"):
            Dessert()
        elif (Main == "Steak"):
            Dessert()
        elif (Main == "Sandwhich"):
            Dessert()
        else:
            print("Sorry, but it appears that the item you have ordered is not on the menu")


    def Dessert():
        Dessert = raw_input("what Dessert would you like today?")

        if (Dessert == "Cream"):
            Beverage()
        elif (Dessert == "Cake"):
            Beverage()
        elif (Dessert == "Moose"):
            Beverage()
        else:
            print("Sorry, but it appears that the item you have ordered is not on the menu")

    def Beverage():
        Beverage = raw_input("what Beverage would you like today?")

        if (Beverage == "Soda"):
            print(add(num1, num2, num3, num4))
        elif (Beverage == "Beer"):
            print(add(num1, num2, num3, num4))
        elif (Beverage == "Wine"):
            print(add(num1, num2, num3, num4))

        else:
            print("Sorry, but it appears that the item you have ordered is not on the menu")

    def add(num1, num2, num3, num4):
        return num1 + num2 + num3 + num4

    def num1():
        if (Fruit == "Apple"):
            num1 = 3
        elif (Fruit == "Banana"):
            num1 = 4    
        elif (Fruit == "Kiwi"):
            num1 = 2    
        elif (Fruit == "Peach"):
            num1 = 5
        else: num1 = 0

    def num2():
        if (Main == "Hamburger"):
            num2 = 12
        elif (Main == "Parma"):
            num2 = 22
        elif (Main == "Steak"):
            num2 = 24
        elif (Main == "Sandwhich"):
            num2 = 10
        else: num2 = 0

    def num3():
        if (Dessert == "Cream"):
            num3 = 3
        elif (Dessert == "Cake"):
            num3 = 8
        elif (Dessert == "Moose"):
            num3 = 2
        else: num3 = 0

    def num4():
        if (Beverage == "Soda"):
            num4 = 3
        elif (Beverage == "Beer"):
            num4 = 8
        elif (Beverage == "Wine"):
            num4 = 12   
        else: num4 = 0









    Fruit()
</code></pre>

<p>You shouldn't name functions the same as variables, i.e. the fruit function should look like this:</p>

<pre><code>def Fruit():
    print("Welcome to The Buttler's Pantery")
    global fruit
    fruit = raw_input("what fruit would you like today?")

    if (fruit == "Apple"):
        Main()
    elif (fruit == "Banana"):
        Main()
    elif (fruit == "Kiwi"):
        Main()
    elif (fruit == "Peach"):
        Main()
    else:
        print("Sorry, but it appears that the item you have ordered is not on the menu")
        Fruit()
</code></pre>

<p>Also note the <code>global</code>, it makes <code>fruit</code> accesable outside the function <code>Fruit()</code>. If you'd apply these changes to all functions, it should work</p>

<p>If you also want to let peaople try again, you could simply call the function again, like in the function <code>Fruit()</code>.</p>

<p>Hope this helps!</p>

python typeerror