+ 1

how to print the following pattern in python: 5#\n 45#\n 345#\n 2345#\n 12345

5th Aug 2017, 6:31 AM
Shreyas
Shreyas - avatar
3 Respuestas
+ 1
for i in range(5,0,-1): for j in range(i,6): print(j,end='') print()
5th Aug 2017, 8:19 AM
visph
visph - avatar
0
print("5#\n 45#\n 345#\n 2345#\n 12345")
5th Aug 2017, 7:44 AM
Martin Ed
Martin Ed - avatar
0
thanks for the answer ..i dint knew it was so easy
5th Aug 2017, 11:27 AM
Shreyas
Shreyas - avatar