Re: new to While statements

2013-08-07 Thread Larry Hudson
On 08/06/2013 08:38 PM, krismesenbr...@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?") One very trivial comment...

Re: new to While statements

2013-08-07 Thread Dave Angel
Vito De Tullio wrote: > Dan Sommers wrote: > while "asking for reponse": >>> while "adventuring": >>> >>> that's a funny way to say `while True:`... >> >> Funny, perhaps, the first time you see it, but way more informative than >> the other way to the next one who come

Re: new to While statements

2013-08-07 Thread Vito De Tullio
Dan Sommers wrote: >>> while "asking for reponse": >> >>> while "adventuring": >> >> that's a funny way to say `while True:`... > > Funny, perhaps, the first time you see it, but way more informative than > the other way to the next one who comes along and reads it. While I und

Re: new to While statements

2013-08-06 Thread krismesenbrink
wow everyone thanks for the feed back! i'll have to rewrite this with everything you guys taught me. this makes ALOT more sense. :D -- http://mail.python.org/mailman/listinfo/python-list

Re: new to While statements

2013-08-06 Thread Dan Sommers
On Tue, 06 Aug 2013 22:42:42 -0700, snakeinmyboot wrote: > I wish I understood half of what you posted Dan. Time to hit the books So think about the "while" statement: it takes an expression (the part before the colon) and a suite (the part after the colon and before the next statement at the sa

Re: new to While statements

2013-08-06 Thread snakeinmyboot
I wish I understood half of what you posted Dan. Time to hit the books -- http://mail.python.org/mailman/listinfo/python-list

Re: new to While statements

2013-08-06 Thread Dan Sommers
On Wed, 07 Aug 2013 07:20:28 +0200, Vito De Tullio wrote: > Joshua Landau wrote: > > >> while "asking for reponse": > >> while "adventuring": > > that's a funny way to say `while True:`... Funny, perhaps, the first time you see it, but way more informative than the other way t

Re: new to While statements

2013-08-06 Thread Vito De Tullio
Joshua Landau wrote: > while "asking for reponse": > while "adventuring": that's a funny way to say `while True:`... -- By ZeD -- http://mail.python.org/mailman/listinfo/python-list

Re: new to While statements

2013-08-06 Thread Joshua Landau
ot;you run away") > > else: > print ("You and the monster just stare at one another") > else: > print ("You find nothing") > # if you decisde to not play it will kill you > e

Re: new to While statements

2013-08-06 Thread snakeinmyboot
yea no problem. heres a little tip though so you atleast get something out of the post. monster_hp = monster_hp - damage_done can be simplified by writing monster_hp -= damage_done the -= means equal to whatever is on the left, minus whatevers on the right. this can be done with addition, mul

Re: new to While statements

2013-08-06 Thread krismesenbrink
and it seems you are right about that, i don't know what was wrong with my IDE before, i closed it and opened it up again,seemed to fix the problem. thanks for taking the time to look at it anyway! -- http://mail.python.org/mailman/listinfo/python-list

Re: new to While statements

2013-08-06 Thread snakeinmyboot
Hey there, cool idea you've got going on here! As far as I can tell though...what you want to happen, is indeed actually happening. Did you mean something else? Everytime I run the script and defeat a monster, it asks me if I want to roll the dice again. -- http://mail.python.org/mailman/listi

new to While statements

2013-08-06 Thread krismesenbrink
u find nothing") # if you decisde to not play it will kill you elif des == ("no"): hp = 0 print ("Maybe next time!") else: print ("please enter yes or no") room() this is the code i'm making. as t