Write a Python program to accept a positive integer n from the user and then print the following pattern using nested loops. For example, if n = 4, the output should be:

   1

  2 3

 4 5 6

7 8 9 10

Answer:

Answer by student

Python program to accept a positive integer n from the user and then print a pattern using nested loops - Teachoo.png

Detailed answer by teachoo

The rest of the post is locked. Join Teachoo Black to see the full post.

Go Ad-free
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science and Computer Science at Teachoo