From 4e190e1b426cb920dac7b10a569da1a3212c923c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Burak=20Guverc=C4=B1n?= Date: Tue, 7 Apr 2026 22:13:45 +0300 Subject: [PATCH 1/5] Create pyramid_ahmet_burak_guvercin.py --- Week03/pyramid_ahmet_burak_guvercin.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Week03/pyramid_ahmet_burak_guvercin.py diff --git a/Week03/pyramid_ahmet_burak_guvercin.py b/Week03/pyramid_ahmet_burak_guvercin.py new file mode 100644 index 00000000..46ef08fd --- /dev/null +++ b/Week03/pyramid_ahmet_burak_guvercin.py @@ -0,0 +1,10 @@ +def calculate_pyramid_height(number_of_blocks): + height = 0 + blocks_needed = 1 + + while number_of_blocks >= blocks_needed: + number_of_blocks -= blocks_needed + height += 1 + blocks_needed += 1 + + return height From a853d81f3a777bf97943b3635186a0f907dbe212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Burak=20Guverc=C4=B1n?= Date: Tue, 7 Apr 2026 22:18:10 +0300 Subject: [PATCH 2/5] Create functions_ahmet_burak_guvercin.py --- Week04/functions_ahmet_burak_guvercin.py | 30 ++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 Week04/functions_ahmet_burak_guvercin.py diff --git a/Week04/functions_ahmet_burak_guvercin.py b/Week04/functions_ahmet_burak_guvercin.py new file mode 100644 index 00000000..bb0db79c --- /dev/null +++ b/Week04/functions_ahmet_burak_guvercin.py @@ -0,0 +1,30 @@ +custom_power = lambda x=0, /, e=1: x ** e + +def custom_equation(x: int = 0, y: int = 0, /, a: int = 1, b: int = 1, *, c: int = 1) -> float: + """ + Calculates the mathematical equation. + + :param x: The first base value. + :type x: int + :param y: The second base value. + :type y: int + :param a: The exponent for x. + :type a: int + :param b: The exponent for y. + :type b: int + :param c: The divisor. + :type c: int + :return: The result of the equation. + :rtype: float + """ + return (x**a + y**b) / c + +def fn_w_counter() -> (int, dict[str, int]): + if not hasattr(fn_w_counter, "count"): + fn_w_counter.count = 0 + + fn_w_counter.count += 1 + + module_name = __name__.split('.')[-1] + + return fn_w_counter.count, {module_name: fn_w_counter.count} From 77814984169d6f071b04fda38187863659913030 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Burak=20Guverc=C4=B1n?= Date: Tue, 7 Apr 2026 22:20:35 +0300 Subject: [PATCH 3/5] Create awaitme_ahmet_burak_guvercin.py --- Week05/awaitme_ahmet_burak_guvercin.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Week05/awaitme_ahmet_burak_guvercin.py diff --git a/Week05/awaitme_ahmet_burak_guvercin.py b/Week05/awaitme_ahmet_burak_guvercin.py new file mode 100644 index 00000000..7f7f7c53 --- /dev/null +++ b/Week05/awaitme_ahmet_burak_guvercin.py @@ -0,0 +1,9 @@ +import asyncio + +def awaitme(function): + async def wrapper(*args, **kwargs): + result = function(*args, **kwargs) + if asyncio.iscoroutine(result): + return await result + return result + return wrapper From 96592c4be5463a17fc978572777cfa496b0151fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Burak=20Guverc=C4=B1n?= Date: Tue, 7 Apr 2026 22:31:28 +0300 Subject: [PATCH 4/5] Create timer_ahmet_burak_guvercin.py --- timer_ahmet_burak_guvercin.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 timer_ahmet_burak_guvercin.py diff --git a/timer_ahmet_burak_guvercin.py b/timer_ahmet_burak_guvercin.py new file mode 100644 index 00000000..eb66df1b --- /dev/null +++ b/timer_ahmet_burak_guvercin.py @@ -0,0 +1,16 @@ +import time + +class Timer: + def _init_(self): + def __init__(self): + self.start_time = None + self.end_time = None + + def _enter_(self): + def __enter__(self): + self.start_time = time.time() + return self + + def _exit_(self, exc_type, exc_val, exc_tb): + def __exit__(self, exc_type, exc_val, exc_tb): + self.end_time = time.time() From 5d70bb4dd85df876c31897ecf0267d6f8436744a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Burak=20Guverc=C4=B1n?= Date: Tue, 7 Apr 2026 22:43:23 +0300 Subject: [PATCH 5/5] Update timer_ahmet_burak_guvercin.py --- timer_ahmet_burak_guvercin.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/timer_ahmet_burak_guvercin.py b/timer_ahmet_burak_guvercin.py index eb66df1b..ac427b69 100644 --- a/timer_ahmet_burak_guvercin.py +++ b/timer_ahmet_burak_guvercin.py @@ -1,16 +1,13 @@ import time class Timer: - def _init_(self): def __init__(self): self.start_time = None self.end_time = None - def _enter_(self): def __enter__(self): self.start_time = time.time() return self - def _exit_(self, exc_type, exc_val, exc_tb): def __exit__(self, exc_type, exc_val, exc_tb): self.end_time = time.time()