title: Trouble with with code Python 3
body: <p>I am very new to python and I'm still learning, I am having trouble trying to get this in my array:</p>
  
  <ul>
  <li>Winner of each Event</li>
  <li>The House with the best average</li>
  <li>The house with the most number of wins</li>
  </ul>
  
  <p>With this code:</p>
  
  <p>To get event names:</p>
  
  <pre><code>Flag = True
  while Flag:
      try:
          e = str(input("Enter Event names [Type XXX to stop]: "))
          if e == 'XXX' or e == 'xxx':
              Flag = False
          else:
              event.append(e)
      except ValueError:
          print("Please enter a word, Thanks")
  print()
  </code></pre>
  
  <p>To get house name:</p>
  
  <pre><code>Flag = True
  while Flag:
      try:
          h = str(input("Eneter House names [Type XXX to stop]: "))
          if h == 'XXX' or h == 'xxx':
              Flag = False
          else:
              total = total + 1
              house.append(h)
      except ValueError:
          print("Please enter a word, Thanks")
  print()
  </code></pre>
  
  <p>For getting the points of events and houses</p>
  
  <pre><code>for i in (event):
      for j in (house):
          Flag = True
          while Flag:
              try:
                  sevent = int(input("Enter %s's house for %s score: "%(j, i)))
                  if sevent &lt; 0:
                      print("Enter a number above 0, Thanks")
                  else:
                      Flag = False
              except ValueError:
                  print("Please enter a number above, Thanks")
  
          if j not in scores:
              scores[j] = []
          scores[j].append(sevent)
          score.append(sevent)
  </code></pre>
  
  <p>I have got it too print overall winner and the total score for each event but I don't know how to get the winner of each event, the house with the best average and the house with the most number of wins.</p>
  
  <p>To get the Overall winner and total score for each event:</p>
  
  <pre><code>for house, score in sorted(scores.items(), key=lambda x: sum(x[1]),reverse=True):
      print ("House %s's Total Score: %i"%(house, sum(score)))
  print(scores)
  print("The Overall Winner is", max(scores, key=lambda h: sum(scores[h])))
  print()
  </code></pre>
  
  <p>An example of the Output is:</p>
  
  <pre><code>House House 1's Total Score: 80House House 3's Total Score: 70
  House House 2's Total Score: 40
  The Overall Winner is House 1
  </code></pre>
  
  <p>The array of the example as follows:</p>
  
  <pre><code>{'House 1': [20, 60], 'House 2': [30, 10], 'House 3': [40, 30]}
  </code></pre>
  
  <p>Thanks for any help, I really do appreciate it.</p>