Printing a X using * in Python
<p>I have to write a python program which allows a user to input an odd integer, n,  greater than or equal to three.  The program outputs an x with n rows and n columns. *My professor said using nested for loops would be ideal for this. The X is printed using *'s *</p>

<p>I have been experimenting over the past couple days and have had little success.
This is my starting code for the program and after that it's just blank, like my mind. If you could provide some explanation as to how the code works that would be amazing. </p>

<p><code>num=int(input("Please type in an odd integer."))
 if num%2==0:
    print("Your number is incorrect")</code></p>

<p>I'll give you a hint :</p>

<pre><code>n = int(input("Please type in an odd integer."))
for i in range(n):
    print('x', end='')
print()
</code></pre>

<p>This prints a x, n times on the same line and then go back to next line.</p>

<p>I'll let you figure out how you print this same line n times.</p>

python for-loop nested-loops