...

/

Solution: Nested Loop With Multiplication (Pro)

Solution: Nested Loop With Multiplication (Pro)

This review provides a detailed analysis of the different ways to solve the nested loop with multiplication challenge.

We'll cover the following...

Solution #

Press + to interact
n = 10 # can be anything
sum = 0
pie = 3.14
j = 1
for var in range(n):
while j < var:
sum += 1
j *= 2
print(sum)

The outer loop in the main function has nn ...

Access this course and 1400+ top-rated courses and projects.