May-29-2017, 12:33 AM
(May-28-2017, 07:25 PM)buran Wrote: so what you have tried, based on my suggestion in post #2? If you expect someone to do this for you - you are mistaken. some examplesSorry, but I do wish the picture I had did load correctly. I did try your method and attempted to convert them into my program, but it wasn't what was needed. I did adjust them a bit as well.n=7 x=4 # example 1 print('{: >{width}s}'.format('O'*x, width=n)) # example 2 print('{}{}'.format(' '*(n-x),'O'*x)) # example 3 print(' '*(n-x), end='') print('O'*x, end='') print()the last one, which is the worst one can be done with even more loops outputNow it's up to you to wrap one of these in a loop
Output:OOOO OOOO OOOO