title: How to count the amount of input of test scores in Python?
body: <p>"My local school district requires an application to compare the average score of boys in a certain test with that of girls. Write an interactive application in Python to display a simple menu to the user. Have them pick a choice for boy (b), girl (g), or quit (q) to quit the program. The program should keep looping until the user chooses to quit. This application will use loops and conditions to accomplish the task. Your program should output the average boy score and average girl score. Your Python program should accept data input by the user. Your program should allow an arbitrary number of boy scores and girl scores, terminated when the user inputs a ‘q’."</p>
  
  <p>*This program isn't running properly and I am unsure where I am going wrong.</p>
  
  <p>This is what I have so far:</p>
  
  <pre><code>bscore = 0
  gscore = 0
  gtotal = 0
  btotal = 0
  baverage = 0
  gaverage = 0
  bcount = 0
  gcount = 0
  gen = 0
  
  while(gen != "q"):
      gen = input("Please enter the scores for Boy(b), Girl(g) or Quit(q): ")
      if(gen == "b"):
          bscore = int(input("Boy score: "))
          bcount += 1
          btotal = btotal + bscore
          baverage = btotal/bcount
      elif(gen == "g"):
          gscore = int(input("Girl score: "))
          gcount += 1
          gtotal = gtotal + gscore
          gaverage = gtotal/gcount
      else:
          gen = input("Boy (b), Girl (g) or Quit (q): ")
  
  print("Boy average is: ", baverage)
  print("Girl average is: ", gaverage)
  </code></pre>
  
  <p>updated: </p>
  
  <pre><code>bscore = 0
  gscore = 0
  gtotal = 0
  btotal = 0
  baverage = 0
  gaverage = 0
  bcount = 0
  gcount = 0
  
  gen = input("Boy(b), Girl(g) or Quit(q): ")
  
  while(gen != "q"):
  
      if(gen == "b"):
          bscore = int(input("Boy score: "))
          bcount += 1
          btotal = btotal + bscore
  
      elif(gen == "g"):
          gscore = int(input("Girl score: "))
          gcount += 1
          gtotal = gtotal + gscore
  
      gen = input("Boy (b), Girl (g) or Quit (q): ")
  
  baverage = btotal/float(bcount)
  gaverage = gtotal/float(gcount)
  
  print("Boy average is: ", baverage)
  print("Girl average is: ", gaverage)
  </code></pre>