Computer Science, asked by 20100246110072, 9 months ago

how to get output 1,9,2,8,3,7,4,6,5,5,6,4,7,3,8,2,9,1 using for loop in python 3?​

Answers

Answered by akshayamca14
0

Answer:

output=''

counter=9

for x in range(1,10):

   output= output +","+ str(x)+","+str(counter)

   counter=counter-1;

print(output[1:])

Explanation:

output:

1,9,2,8,3,7,4,6,5,5,6,4,7,3,8,2,9,1

Similar questions