concept while loop in category python
appears as: while loop, while loops, The while loop

This is an excerpt from Manning's book Get Programming: Learn to code with Python.
for x in range(3): #1 print("var x is", x) !@%STYLE%@! {"css":"{\"css\": \"font-weight: bold;\"}","target":"[[{\"line\":0,\"ch\":29},{\"line\":0,\"ch\":31}]]"} !@%STYLE%@!
Write a program that asks a user whether they want to play a game. If the user enters y or yes, indicate that you’re thinking of a number between 1 and 10 and ask the user to guess the number. Your program should continue asking the user to guess the number until they get it right. If they get it right, print a congratulatory message and then ask if they want to play again. This process should be repeated as long as the user enters y or yes.