+ 3
How to print the following pattern?
11111 2222 333 44 5
2 Antworten
+ 2
Probably not how your teacher wants to have it, but it works:
n = 5
i = 0
while True:
for j in range(n, 0, -1):
print(j * str(i+1)) #maybe you need to do this with another for loop if you use a different language
i += 1
break
(If you need it in a different language than python, feel free to translate the code to the programming language of your choice)