0

0 22 444 8888.... please help as stuck on the first line....??

here is my progress :-- n=int(input("Enter the no of rows")) for i in range(1,n+1): for j in range(0,i): print(2**i-2**(i-1),end="") print()

17th Feb 2020, 6:53 PM
pratham
3 Antworten
+ 2
Add print('0') after 1st line. And in outer for loop start from 2 instead of 1
17th Feb 2020, 7:07 PM
Peter Parker
Peter Parker - avatar
+ 2
Shouldn't the first number be 1 if the pattern is to be consistent?
17th Feb 2020, 7:10 PM
Russ
Russ - avatar
0
n=3 for i in range(0,5): for j in range(0,i+1): print(2*i,end="") print() Subscribe to my channel Circuit Overtime. This will work!
26th Aug 2021, 6:28 AM
Circuit Overtime
Circuit Overtime - avatar