Assistance needed with basic Python program
<p>I am trying to learn programming and was doing some exercises when I came upon this question involving loops. Here is the question:</p>

<blockquote>
  <p>Create a program that gets the marks the user has for their classes this year (ask the user how many classes they are taking). Tell them how many classes they are failing, their best mark and their worst mark. </p>
</blockquote>

<p>I don't know how to display the best mark and the worst mark. Here is what I got:</p>

<pre><code>count = 0
total = 0

while True:
    mark = input("Enter a mark (0-100) &lt;-1 to exit&gt; ")
    if mark == -1:
        break
    elif mark &lt; 50:
        count += 1
        total += mark

print "You failed",count,"class(es). "
</code></pre>
