while loops we have already learned about for loopswhich allow us to repeat things specified number of times sometimesthoughwe need to repeat somethingbut we don' know ahead of time exactly how many times it has to be repeated for instancea game of tic-tac-toe keeps going until someone wins or there are no more moves to be madeso the number of turns will vary from game to game this is situation that would call for while loop examples example let' go back to the first program we wrote back in section the temperature converter one annoying thing about it is that the user has to restart the program for every new temperature while loop will allow the user to repeatedly enter temperatures simple way for the user to indicate that they are done is to have them enter nonsense temperature like - (which is below absolute this is done belowtemp while temp!=- temp eval(input'enter temperature (- to quit)')print'in fahrenheit that is ' / *temp+ look at the while statement first it says that we will keep loopingthat iskeep getting and converting temperaturesas long as the temperature entered is not - as soon as - is enteredthe while loop stops tracing throughthe program first compares temp to - if temp is not - then the program asks for temperature and converts it the program then loops back up and again compares temp to - if temp is not - the program will ask for another temperatureconvert itand then loop back up again and do another comparison it continues this process until the user enters - we need the line temp= at the startas without itwe would get name error the program would