[Tutor] beginners question

alan.gauld@bt.com alan.gauld@bt.com
Tue, 19 Mar 2002 17:00:13 -0000


> How about something like this?
> 
> playagain = 'y'
> while playagain == 'y':
  while playagain in 'yY':  
	# to cover shift/caps lock...playagain[0] is better still!

>     <your code here>
> 	playagain = raw_input("Would you like to play again? (y/n) \n")

And personally I prefer my prompts to be on the same line as 
the input so I'd remove the \n at the end of the string...

Just feeling picky,

Alan G