+ 3
Pls help me to print the following code in Python
1 2 6 3 7 10 4 8 11 13 5 9 12 14 15
8 Respuestas
+ 6
Well this is really not as easy as it first seemed, but in the end I was able to crack a formula:
https://code.sololearn.com/cyd47tW9jB6T/?ref=app
+ 5
Thank you very much Tibor Santa
+ 3
Let me also try, although my way is not as elegant as Tibor's. :)
n=5
for i in range(1, n+1):
l = list(range(1, n))[n-i:]
print(i, end=' ')
while l:
i += l.pop()
print(i, end = ' ')
print()
+ 1
Yeah here I'm giving the way I tried but failed:
K=1
for i in range (1,6):
for j in range (i,0,-1):
print(k,end="")
K=k+1
print ()
Can you just say me where I've made the mistake?
0
The point of these riddles is that you solve them yourself, for training.
So your teacher would be very unhappy if we just gave you the solution.
Wanna share an attempt of your own?
0
Please can you help me ???🥺
0
Remind that you defined K as capital letter.
0
MNM I don't think so I think he wrote the code himself here and didn't copy this from the code playground so the keyboard made his first letter capitalize.