From a1160fdff1fcd848ca5b7e8a621c7bda6eb5b781 Mon Sep 17 00:00:00 2001 From: Saleh Date: Thu, 19 Feb 2026 12:21:18 +0300 Subject: [PATCH 1/2] Lab Function Feb 19, 2026 --- Lab_functions.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Lab_functions.py diff --git a/Lab_functions.py b/Lab_functions.py new file mode 100644 index 0000000..e482479 --- /dev/null +++ b/Lab_functions.py @@ -0,0 +1,9 @@ +#lab functions + +def patter(number:int): + '''This function prints a pattern of numbers based on the input number.''' + for i in range(number, 0, -1): + for j in range(i): + print(i-j, end=' ') + print() +patter(5) From d14597f8d18e5ad260f4406999cf3a16d2a3b637 Mon Sep 17 00:00:00 2001 From: Saleh Date: Thu, 19 Feb 2026 12:22:22 +0300 Subject: [PATCH 2/2] Lab Function bonus Feb 19, 2026 --- bonus.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 bonus.py diff --git a/bonus.py b/bonus.py new file mode 100644 index 0000000..fcaa082 --- /dev/null +++ b/bonus.py @@ -0,0 +1,10 @@ +#Lab bonus +def patter(number:int): + '''This function prints a pattern of numbers based on the input number.''' + for i in range(number, 0, -1): + for j in range(i): + print(i-j, end=' ') + print() + +result = 5 +patter(result)