Python 3 Script to Print Simple Number Triangle Pattern Using For Loop Full Project For Beginners

Python 3 Script to Print Simple Number Triangle Pattern Using For Loop Full Project For Beginners

 

Welcome folks today in this blog post we will be printing simple number triangle pattern using for loop in python.All the full source code of the application is given below.

 

 

Get Started

 

 

In order to get started you need to make an app.py file and copy paste the following code

 

Printing Number Triangle

 

app.py

 

rows = 6

for num in range(rows):

    for i in range(num):

        print(num,end="") # print number

    # line after each row to display pattern correctly

    print("")

 

READ  Python 3 Tkinter Read Only Text Widget GUI Desktop App Full Project For Beginners

 

Now if you execute the python script by typing the below command as shown below

 

python app.py

 

Leave a Reply