Answer :

mark454

Answer:

for i in range(1,100):

print(f"{i}-----{100 - i}")

OR:

for i in range(1,100):

print(str(i)+"-----"+str(100 - i)")

Explanation:

First off, we can see that the program starts off with an iteration of 1 and ends at 100. So we use this loop code to begin:

for i in range(1,100):

Then, we use this code to print the pattern (make sure to indent this):

print(str(i)+"-----"+str(100 - i)")

We can also use f-strings as a better and cleaner alternative (make sure to indent this too):

print(f"{i}-----{100 - i}")

This code will get us the output shown in the question.

Other Questions