title: We need to print this pattern but i don't know why my code is not printing the correct pattern, Also we have to use only while loop
body: <p>Print the following pattern for the given N number of rows.</p>
  <p>Pattern for N = 4:</p>
  <pre><code>A
  BC
  CDE
  DEFG
  </code></pre>
  <p>My code is printing this:</p>
  <pre><code>A
  BC
  CED
  DGFE
  </code></pre>
  <p>Code:</p>
  <pre><code>n = int(input())
  i = 1
  start_char = chr(ord('A'))
  
  while i &lt;= n:
      j = 1
      while j &lt;= i :
          charP = chr(ord(start_char) + i - 1)
          print(charP, end = '')
          start_char = chr(ord('A')+ i - j)
          j += 1
      print()
      i += 1
  </code></pre>