The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

This topic is READ ONLY
kamaboko (5) [Avatar] Offline
#1
Hi,

OK, I give up. Can someone please walk me through this nested loop and explain how it works? I absolutely do not get it.

What I do know. When I enter a three (as in the example), I see how that makes my block range (1, 4), which would give me three blocks. After that, I'm completely lost. I want to be able to see how it spins through this loop before going further in the book.

Thanks,
K
Bennjamin (27) [Avatar] Offline
#2
Re: Need help with Chapter 11, exercise 11.4
Ok, well, the first 2 lines set up the number of blocks, the third line:
for line in range(1, block * 2)
well, i think the number of lines is equal to the blcok number in.. wait...
Ok, never mind, i'm not really sure either. maybe you should try typing it in and running it yourself and see if you understand then????