While Loops
Number Guesser
Conclusion:
1.) If you change between 1 and 20 from the previous program to between 1 and 6000, how many will you need to guarantee that you have the right answer?
To guarantee that you have the right answer you will need 6000 because there are 6000 numbers one can guess so someone could guess every number except the right one, then the last guess would be the right one, which would add up to 600 guesses.
2.) Describe the difference between a while loop and a for loop.
A for loop repeats a block of code for every time an event occurs. A while loop repeats a block of code so long as a condition remains true.