I'm learning to use python and I'm stuck on this code.
I want to display rows but instead I'm getting columns. I have tried different variations where, I get a row for the while loop but I still end up getting a column for the for loop.
Start_num = 0
Max_num = 200
while Start_num < 201:
for Number in range (Max_num, -1, -25):
print(Start_num, end=' ')
Start_num += 25
print(Number)
This is how the output currently looks for this code.
0 200
25 175
50 150
75 125
100 100
125 75
150 50
175 25
200 0
There is got to be a way to get two rows instead of columns, please help.
rangeobjects andzipto skip the weirdness of incrementing by-hand.for a, b in zip(range(0, 201, 25), range(200, -1, -25)): print(a, b). This doesn't address how to format that by rows instead of columns, however.