title: Sum of Numbers Exercise, Python 3
body: <p>Any help would be much appreciated. I am new studying Python. Here is the exercise I have to complete. I have seriously given this about 3 to 4 hours of my time so no worries that I am "asking someone to do my work for me." Here is the exercise and what I have so far. I have been puzzling these out and "hacking" my way through the learning process. If you know the whole code and don't mind including it, I would very much appreciate it.
  EXERCISE: Write a program with a loop that asks user to enter positive numbers. Users should enter a negative number to signal the end of the series. When the user ends the program (by typing in a negative number) the sum of the positive numbers should be displayed. Here is what I have so far.</p>
  
  <pre><code># The main function.
  def main():
  # Variable to control the outer loop.
  another = 'y'
  while another == 'y' or another == 'Y':
      numbers()
      another = input('Run this program again?\n\
  Enter y for yes.')
  def numbers():
  positive = int(input('Enter a positive number: '))
  while positive &gt; 0:
  positive = int(input('Enter a positive number, or enter a\n\
  negative number to end and calculate the sum: '))
  positive = int(input('Enter a positive number: '))
  while positive &lt; 0:
  for i in range (positive):
      print(i)
  # Call the main function.
  main()
  </code></pre>