title: Python if and else print condition
body: <p>If an integer is divisible by 3, print "Hi"</p>
  
  <p>If it is divisible by 7, print "Bye"</p>
  
  <p>If it is divisible by both 3 and 7, print "HiBye"</p>
  
  <p>As of now I have tried:</p>
  
  <pre><code>for i in range(1,100):
      if i % 3 == 0:
          print "Hi"
      if i % 7 == 0:
          print "Bye"
      if i % 3 == 0 and i % 7 == 0:
          print "HiBye"
      else: 
          print i
  </code></pre>
  
  <p>But my numbers are repeated. i.e. this is the output I get. </p>
  
  <pre><code>1
  2
  Hi
  3
  4
  5
  Hi
  6
  Bye
  7
  8
  Hi
  9
  10
  11
  Hi
  12
  13
  Bye
  14
  Hi
  15
  16
  17
  Hi
  18
  19
  20
  Hi
  Bye
  HiBye
  </code></pre>
  
  <p>As you can see, the 3 is repeated again. I think the mistake is in the </p>
  
  <pre><code>else:
      print i
  </code></pre>
  
  <p>statement</p>