http://prntscr.com/bo3wzg I'm confused what they mean when they say the middle loop will iterate 60 times for each iteration of the outermost loop. I understand the innermost loop will iterate 60 times for each iteration of the middle loop, but the middle loop iterating 60 times for each iteration of the outermost loop confuses me since the minute hand has to do twelve full revolutions for the hour hand to move once. So, where the heck is the 60 coming from? I think this is more so a math question than a programming one thus why I put it here.
@zepdrix
would 60 be the number of minutes per hour?
It's very confusing because what I got from the innermost loop will iterate 60 times for each iteration of the middle loop was that for every time the secondhand goes around 60 times the minute hand will have gone around once. There are five minutes in between all of the 12 marks on the clock. Therefore, 5x12=60. That makes sense then because every time the secondhand goes around 60 times the minute hand goes around the whole clock once and the hour hand goes from one (assuming its one in our example) to two. So, why is it saying for every time the minute hand goes around 60 times the hour hand goes around once?
I know it's not a mistake in the book, but we ourselves have to figure out what it means and I'm stumped. Unless I interpreted something wrong about the innermost loop and the way it interacts with the middle loop, I'm not sure what they're saying.
Are you sure it says that the hour hand goes fully around once?
Well by the picture I believe the minutes are the middle loop and the outermost loop is the hours loop. See the sentence where is says the middle loop will iterate (repeat or loop again in this case) 60 times for each iteration of the outermost loop? Well, above the paragraph is a picture that shows For hours For minutes and For seconds I think minutes are the middle, seconds are the innermost, and hours are outermost. That's what I'm basing my comment on.
Thats What I was figuring as well.
Well I am stumped too. I am sorry.
Thanks for trying haha.
what class is this for?
Programming.
@agent0smith
It never said 60 full revolutions of minute hand gives one hour. Think of it as, 60 ticks of minute hand gives one hour. Each tick of minute hand is an iteration of the middle(second) loop
Join our real-time social learning platform and learn together with your friends!