+ 1
Can any one explain this program step by step plz
for i in range(1,6): for j in range (1,i+1): print i print output 1 22 333 4444 55555
3 Antworten
+ 5
for i in range(1,6)#i=1,2,3,4,5
for j in range(1,i+1)#(1),(1,2),(1,2,3),(1,2,3,4),(1,2,3,4,5)
print(i)#(1),(2,2),(3,3,3),(4,4,4,4),(5,5,5,5,5)BTW Python 3+ uses print() not simply print
print#this is still very python 2.7
the print statements should be :
print(i,end='\n')
print("")
0
sorry I didn't get ur answer
0
For step by step answers on Python, this may help.
http://www.pythontutor.com/