the time complexity of this loop then becomes ( (no( ( here we are simply multiplying the time complexity of the operation with the number of times this operation executes the running time of loop is at most the running time of the statements inside the loop multiplied by the number of iterations single nested loopthat isone loop nested inside another loopwill run in time assuming both loops run times for examplefor in range( , )for in range( , #statements each statement is constantcexecuted nn timesso we can express the running time as cn cn ( for consecutive statements within nested loops we add the time complexities of each statement and multiply by the number of times the statement executed for examplen # #executes times for in range( , )print( # #executes times for in range( , )#executes times for in range( , )print( # this can be written as + cn ( we can define (base logarithmic complexityreducing the size of the problem by / in constant time for exampleconsider the following snippeti while <ni= print(inotice that is doubling on each iterationif we run this with we see that it prints out four numbers and if we double we see it prints out five numbers with each subsequent doubling of the number of iterations is only increased by if we assume iterationswe can write this as follows