import
random
secret
= random.
randint
(
1
,
10
)
guess
=
int
(
input
(
"Guess a number 1 to 10: "
))
while
guess
!=
secret
:
guess
=
int
(
input
(
"Wrong, guess again: "
))
print
(
"Correct"
)
Back
Next
Restart
Step 1 of 8
secret
?
hidden
guess
not asked yet
Condition check
guess != secret
not checked
the loop has not been reached yet
Output / dialogue
(nothing printed yet)