Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 20 Online
OpenStudy (anonymous):

hy, can someone explain me how was determined number of guesses in lecture 3?

OpenStudy (anonymous):

For every guess, we go through the loop once. In the loop body there is a line that says: numGuesses += 1 This line increments the value of numGuesses by one each time we go through the loop, or put another way, each time we guess. We can then print the final value of numGuesses to show how many times we guessed. I hope this helps.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!