deflog1(n):while n > 0:
print(n)
n = n // 2# based on log_2deflog2(n):if n == 0:
return1elif n % 2 == 0:
return (log2(n // 2)) ** 2else:
return n * log2(n - 1)
Linear Growth
deflinear1(n):while n > 0:
print(n)
n -= 1deflinear2(lst):for x in lst:
print(x)
Quadratic Growth
deflinear1(lst):for row in lst:
for item in lst:
print(item)
Exponential Growth
defexp1(lst):if n == 0or n == 1:
return n
else:
return exp1(n - 1) + exp1(n - 2)