From 91a05cae3dda3121669f2ad9344560e43bc63cf0 Mon Sep 17 00:00:00 2001 From: Ankit9126 Date: Fri, 14 Oct 2022 11:50:28 +0530 Subject: [PATCH] reverse-number-decrement added by Ankit --- CONTRIBUTORS.md | 2 +- Python/reversenumberdecrement.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Python/reversenumberdecrement.py diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0baa418..1b02a18 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -38,6 +38,6 @@ Check bellow code as referance. | Bhavik Agrawal | Bhavik0902 | Mail | | Arn Arn | arn355 | Mail | | Sarthak Roy | sarthakroy2002 | Mail | - +| Ankit Goyal| Ankiit9126 | Mail |

🖥️ Happy Hacking...

diff --git a/Python/reversenumberdecrement.py b/Python/reversenumberdecrement.py new file mode 100644 index 0000000..6d0f622 --- /dev/null +++ b/Python/reversenumberdecrement.py @@ -0,0 +1,16 @@ +# output: +# 1 +# 2 1 +# 3 2 1 +# 4 3 2 1 +# 5 4 3 2 1 + +# PROGRAM: + +# first we take no. of rows +rows = 6 + +for i in range(1, rows): + for j in range(i, 0, -1): + print(j, end=' ') + print("") \ No newline at end of file