Beruflich Dokumente
Kultur Dokumente
Controlled
Iteration is the process of repeating a process over and over. Often in
programming you need to repeat a block of code several times.
WHILE Loops
A while loop is known as a condition controlled loop, you should use it
when you do not know how many times the code needs to repeat as
you can say repeat while a condition is True.
End While
MessageBox.Show("Game over")
'a loop that repeats while the users guess is not the same as the answer
attempts = attempts + 1
End While
MessageBox.Show("Well done you correctly guessed the number, it took you " &
attempts.ToString & " attempts")