Coursera Python: Programming for everybody assignment 5.2
<p>I have been taking Coursera's course, Programming for Everybody with Python. But one of the assignment 5.2 on week 7 got my attention.</p>

<p>The objective is to make the user enter some numbers and enter done, when he entered all the numbers he wanted. After that, the output should be the biggest number and smallest number he entered.</p>

<p>Here is the problem. If I enter a negative number it is not displayed. Let's say I enter: 32, 55,10, -2 76. The output should be 76 and -2. But what really happens is that 76 and 10 are printed out.</p>

<p>Do you guys have any idea why this happens?</p>

<p>Here is the code.</p>

<pre><code>largest = None
smallest = None
while True:
    try:
        num = input("Enter a number: ")
        if num == "done":
            break
        print (num)

        num = int(num)

        for number in range(num):

            if largest is None or largest &lt; num:
                largest = num
                continue
            elif smallest is None or smallest &gt; num:
                smallest = num       
    except ValueError:
        print("Please, enter only numbers.")

print ("Maximum", largest)
print ("Minimum", smallest)
</code></pre>