From 50a6e8c39e0dfb11119e020c74d33dacba9c622a Mon Sep 17 00:00:00 2001 From: AV-codes55 <115860278+AV-codes55@users.noreply.github.com> Date: Sat, 15 Oct 2022 00:36:16 -0700 Subject: [PATCH] Added a pattern --- Pattern.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Pattern.py diff --git a/Pattern.py b/Pattern.py new file mode 100644 index 0000000..bf056db --- /dev/null +++ b/Pattern.py @@ -0,0 +1,20 @@ +/* +1 +1 2 +1 2 3 +1 2 3 4 +1 2 3 4 5 + +*/ + +rows = int (input ("Enter no. of rows : ")) + +for i in range (1,rows+1): + num = 1 + for j in range (i): + print(num,end= " ") + num+=1 + print() + + +