Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Week04/functions_burakhan_gultoplar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
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:
"""
This function does something

:param x: positional only argument, defaults to 0
:type x: int
:param y: poisitonal only argument, defaults to 0
:type y: int
:param a: positional or keyword argument, defaults to 1
:type a: int
:param b: positional or keyword argument, defaults to 1
:type b: int
:param c: keyword only argument, defaults to 1
:type c: int
:return: the result of division by c the sum of x to the power of a and y to the power of b
: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
return fn_w_counter.count, {__name__: fn_w_counter.count}
5 changes: 5 additions & 0 deletions Week05/awaitme_burakhan_gultoplar.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
def awaitme(func):
async def init(*args,**kwargs):
res = func(*args,**kwargs)
return res
return init
Loading