title: Mario CS50 in Python
body: <p>so I tried coding the mario assignment from CS50 in python instead of C to challenge myself and I managed to get it to work! I don't quite understand how the loops are working, especially the math because I just played around to get the result I wanted.</p>
  
  <p>The requirements of the assignment were as follows</p>
  
  <ol>
  <li>Create a half pyramid using hashes</li>
  <li>Make sure it's right aligned</li>
  <li>It should correspond to the height given by the User</li>
  <li>The first line should start with 2"#"s</li>
  </ol>
  
  <p>Any clarification on my loops would be greatly appreciated :)</p>
  
  <pre><code>print('Height: ', end='');
  h = int(input());
  
  while(h&lt;0 or h &gt; 24):
    print("That is an invalid input")
    print('Height: ', end='');
    h = int(input());
  
  for i in range(h):
      print(" "*(h-i)+"#"*(i+1));
  </code></pre>