Pyramid of stars using while loops python nested while loops
<p>I have been having trouble with something I am working on for the past two days trying to make a pyramid of stars using while loops from user input</p>

<p>an example of the final result would look like this:</p>

<pre><code>     *
    ***
   *****
  *******
 *********
</code></pre>

<p>but I am not even clearly sure how this is supposed to work. As I have tried for the past two nights to figure this problem out. </p>

<p>This is all I have so far:</p>

<pre><code>userInput = int(input("Please enter the amount of rows: "))
count = 1
spacing = 0
actualStars = "*"
numberStars = 0
rows = 0
while(userInput &lt;= rows):
    rows += count
    print()
    while(spacing &lt;= userInput):
        spacing += count
        print(" ")
        while(numberStars &lt;= 0):
            print(actualStars)
</code></pre>