I need help making a triangle that generates using user input by making the user enter the number of rows
<p>It should look like this but reversed and the first column indented</p>

<pre><code>OOOOOOO  
 OOOOOO  
  OOOOO  
   OOOO  
    OOO  
     OO  
      O
</code></pre>

<p>Every time I attempt to do it I always get this code iteration and I don't know where I am going wrong.</p>

<p>Here is what I got so far</p>

<pre><code>row = int(input('Please enter how many rows you want: '))

for r in range(row,0,-1):
    for c in range(r):
        print('o', end='')
    print('')
</code></pre>

<pre><code>line = int(input('number of lines'))
for i in range(1, line + 1):
    a = 'O' * ((line + 1)  - i)
    b = " "*(i)
    print(b + a)
</code></pre>

<p>I don't understand what 'first column indented' means but this posts what you want I believe. </p>

<p>for <code>line = 5</code> 
this prints </p>

<pre><code> OOOOO
  OOOO
   OOO
    OO
     O
</code></pre>

<p>Unless you mean reversed as to be like this? </p>

<pre><code>     O
    OO
   OOO
  OOOO
 OOOOO
</code></pre>

<p>In which case the code is: </p>

<pre><code>line = int(input('number of lines'))
for i in range(line , 0, -1):
    a = 'O' * ((line + 1)  - i)
    b = " "*(i)
    print(b + a)
</code></pre>

<p>Or perhaps you mean reversed like this?</p>

<pre><code>O
OO
OOO
OOOO
OOOOO
</code></pre>

<p>In which case, this code is your friend:</p>

<pre><code>line = int(input('number of lines'))
for i in range(line , 0, -1):
    a = 'O' * ((line + 1)  - i)
    print(a)
</code></pre>

<p>As you can see specific questions help. </p>

python for-loop nested-loops