[Solved]Python Would Format Grid Aligned Correctly See Tried Center Still Correct Import Random Ro Q37069686
python: how would I format thegrid below so that it is aligned correctly? as you see, I tried tocenter it but it is still not correct.
import random
row=random.randint(1,10)
col=random.randint(1,10)
for r in range(row):
for c in range(col):
if r %2==0 and c %2==0:
print(format(‘a’,’^3′),end=’ ‘)
elif r %2!=0 and c %2!=0:
print(format(“/x”,’^3′),end=”)
else:
print(format(‘s’,’^3′),end=’ ‘)
print() #go to next line
current Output is: (example if random function choses col=4 androw=3)
a – a –
s /x s /x
a – a –
Expected output: Rows Should be aligned so thateach row and column line up together
“””
Expert Answer
Answer to python: how would I format the grid below so that it is aligned correctly? as you see, I tried to center it but it is st… . . .
OR

