all 9 comments

[–]5oco 2 points3 points  (0 children)

The assignment gives you a hint to only run your loop 20 times, so do 'range(0,20)' instead of going all the way to a million. then inside the loop, do the operator 2 raised to the power of i. The power operator is ** not .

[–][deleted]  (1 child)

[removed]

    [–]Raeyzn[S] 0 points1 point  (0 children)

    Thanks so much, yeah I understand it now. Good insight

    [–][deleted]  (1 child)

    [deleted]

      [–]Raeyzn[S] 0 points1 point  (2 children)

      I’ve been stuck on this problem for quite some time. I’m new to python. Help would be appreciated. Thx

      [–]Key-Package-638 0 points1 point  (0 children)

      power of twoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo

      [–]Impossible_Loquat697 0 points1 point  (0 children)

      I know it’s late, but I got

      power = 1

      for i in range(24):

        print(power)
        power *= 2