new to While statements

Larry Hudson orgnut at yahoo.com
Wed Aug 7 23:21:07 EDT 2013


On 08/06/2013 08:38 PM, krismesenbrink at gmail.com wrote:
> import random
>
>
>
> def room ():
>
>      hp = 10
>      while hp != 0:
>
>          random_Number = random.randint(1, 2)
>
>          #asking if you want to roll/play
>          des = input("Would you like to roll the die?")
>
<snip>

One very trivial comment...  Add one or two spaces to the end of your prompt string, (I like to 
use two).

No biggie, but it just looks nicer if the answer doesn't butt up directly against the end of the 
prompt.

      -=- Larry -=-




More information about the Python-list mailing list