title: How to fix a for loop when it doesn't run through the whole code
body: <p>I am studying Python and now I'm doing a small project on my own. The for loop in the second function is not run through the whole code. When I run the code I get just the last element of the dictionary. </p>
  
  <p>In order to solve it I have tried to use <code>while</code> but I got the same answer. </p>
  
  <pre><code>def enter_task():
      global num_task
      num_task = int(input("Please, enter number of tasks: "))
      calendar = {}
      for i in range(0, num_task):
          global task
          task=input("Please, enter task: ")
          set_time = input("Please, enter time for {}: ". format(task))
          calendar[task] = set_time
          print(calendar)
  
  
  def conclusion():
      count = 0
      for i in range(0, num_task):
          is_done = input("Is task {} completed? Enter Yes/No: ".format(task))
          if is_done == "yes":
              count += 1
              return count
      print('Nicely done. {} of {} tasks were completed today'. format(count, num_task))
  
  </code></pre>
  
  <p>When I call conclusion, the <code>input is_done</code> is shown just once and the task is equal to the last task I typed in the function <code>enter_task</code>. Also the <code>count</code> is not counting and the statement is not printed. The <code>input is_done</code> should appear as many times as  <code>nun_task</code> and each time with a different task on it. </p>