How do i print out a number triangle in python? -



How do i print out a number triangle in python? -

how print out number triangle in python using loop based program? not homework assignment or exercise book have been trying have not come close. triangle should print out looking this:

1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6

for in range(7): print (str(i) + " ")*i

output:

1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6

python

Comments

Popular posts from this blog

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

ubuntu - Bash Script to Check That Files Are Being Created -