title: Python code for the coin toss issues
body: <p>I've been writing a program in python that simulates 100 coin tosses and gives the total number of tosses. The problem is that I also want to print the total number of heads and tails.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>import random
  tries = 0
  while tries &lt; 100:
      tries += 1
      coin = random.randint(1, 2)
      if coin == 1:
          print('Heads')
      if coin == 2:
          print ('Tails')
  total = tries
  print(total)
  </code></pre>
  
  <p>I've been racking my brain for a solution and so far I have nothing. Is there any way to get the number of heads and tails printed in addition to the total number of tosses?</p>