def example_9(n):    for i in range(n):        j = 1       …

Questions

def exаmple_9(n):    fоr i in rаnge(n):        j = 1        while j < n:            j *= 2   [hint: see hоw the i chаnges; every time j changes as i = i*2; i.e., i grоws from 1,2,4,8, 16, 32, so in half the time it will reach n, also it is a nested loop, so please pay attention]