Skip to content

Commit

Permalink
Update Floyd's_Triangle
Browse files Browse the repository at this point in the history
  • Loading branch information
rishubhjain authored Oct 10, 2017
1 parent 9451b9b commit a119c21
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Patterns/Floyd's_Triangle
Original file line number Diff line number Diff line change
@@ -1 +1,14 @@
# Simple Python program to print Floyd's Triangle

from __future__ import print_function

# Required input from user.
num1 = input(" Please enter number of rows of Floyd Triangle you want to print: ")
num1 = int(num1)
k = 1
for i in range(1, num1+1):
for j in range(1, i+1):
print(k, end=' ')
k = k + 1
print()
print()

0 comments on commit a119c21

Please sign in to comment.