From b5a36c941da071a176889720d0ba6769ac70813d Mon Sep 17 00:00:00 2001 From: GANESH CHANDRAN Date: Fri, 20 Dec 2024 20:20:02 +0530 Subject: [PATCH] Add files via upload --- Day-18/ganesh18.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Day-18/ganesh18.py diff --git a/Day-18/ganesh18.py b/Day-18/ganesh18.py new file mode 100644 index 0000000..b4cc0e5 --- /dev/null +++ b/Day-18/ganesh18.py @@ -0,0 +1,20 @@ +grid = [ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9] +] + +for row in grid: + for element in row: + print(element, end=" ") + print() +n=int(input("ENTER LIMIT:")) +for i in range(1, n + 1): + for j in range(i): + print("*", end="") + print() + +for i in range(1, 6): + for j in range(1, 6): + print(f"{i * j:2}", end=" ") + print() \ No newline at end of file