0

How to print in following pattern by taking input from user

n=int(input('NUMBER':)) if in =5 then it has to print 55555 4444 333 22 1

12th Oct 2018, 11:26 AM
Pranay Bhoir.
Pranay Bhoir. - avatar
6 Answers
12th Oct 2018, 2:46 PM
James
+ 4
Here's another way: for i in range(int(input()), 0, -1): print(str(i) * i)
13th Oct 2018, 5:06 AM
David Ashton
David Ashton - avatar
+ 1
Mohamed ELomari without using str function
12th Oct 2018, 12:33 PM
Pranay Bhoir.
Pranay Bhoir. - avatar
12th Oct 2018, 12:48 PM
MO ELomari
MO ELomari - avatar
0
Mohamed ELomari Thanks! can you please explain?
12th Oct 2018, 2:27 PM
Pranay Bhoir.
Pranay Bhoir. - avatar