I am learning Python and need a little help with moving my symbols over a few spaces to the left. I have completed the assignment and am not looking for homework help. I just want it to look nicer on my end. In the picture that I added in the link below, you can see that the "#" is too far to the right. I would like it to sit next to the even numbers. I have tried making more spaces in my print statements but all that does is move my entire table around. How do I get that "#" to sit right next to my even numbers?
Here is my code.
#ask for user input on size of Multiplication Table.
size = int(input("What size Multiplication Table would you like? (2-10):"))
while (size <2) or (size >10):
print("Invalid entery! Enter a Number Between 2 and 10")
size = int(input("What size Multiplication Table would you like? (2-10):"))
print()
print()
#dispaly header
print(" --- Multiplication Table(",size,"x",size,") ---")
print(" ",end="")
size += 1
for h in range(1,11):
if h == 10:
print(" ",h, end=" ")
else:
print(" ",h, end=" ")
print()
for h in range(1,100):
print('-',end='')
print()
#display Multiplication Table
#outer loop
for a in range(1,size):
if a ==10:
print('',a,'|',end='')
else:
print('',a,' |',end='')
#inner loop
for b in range(1,size):
result = a * b
if result >=100:
print(' ',result, end=' ')
elif result >=10:
print(' ',result, end=' ')
else:
print(' ', result, end=' ')
# for putting '#' at the end of even numbers
if result %2==0:
print('#', end='')
elif result == 100:
print('', end='')
else:
print(' ', end='')
print()