How do I complete this function?
<p>For your assignment you must write a compare function that returns 1 if a > b , 0 if a == b , and -1 if a &lt; b . The user must be prompted for the values of a and b. The compare function must have arguments for a and b. To demonstrate your compare function, you must call the compare function three times, once for each condition, from within your program and display (using print statement) the return code of the function.</p>

<p>This is what I have so far...</p>

<pre><code>#-----define the compare function
def compare(a,b):
    if (a == b):
        return 0
    elif (a &gt; b):
        return 1
    else:
        return -1
</code></pre>

<p>What do I do next?</p>

<p>Here is a menu driven solution that will run three times as desired.</p>

<pre><code>   def compare(a,b):
    if (a == b):
        return 0
    elif (a &gt; b):
        return 1
    else:
        return -1

counter =0
while counter &lt; 3:    
    response=raw_input("Enter a Value for a and b [e.g. (4,5) ] : ")
    a , b = str(response).split(",")
    result = compare(a,b)
    print result
    counter += 1
</code></pre>

<p><strong>Output:</strong></p>

<pre><code>   Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
&gt;&gt;&gt; ================================ RESTART ================================
&gt;&gt;&gt; 
Enter a Value for a and b [e.g. (4,5) ]: 4,5
-1
Enter a Value for a and b [e.g. (4,5) ]: 5,4
1
Enter a Value for a and b [e.g. (4,5) ]: 5,5
0
&gt;&gt;&gt; 
</code></pre>

python