On Sun, 1 Aug 2010 10:20:31 am Alan Gauld wrote:
> "Jason MacFiggen" wrote
>
> > and also, what can I do instead of writing print so many times?
>
> Learn about format strings and use triple quoted strings.
*slaps self in head*
Doh! How could I have forgotten triple quoted strings?
*slinks off
"Jason MacFiggen" wrote
and also, what can I do instead of writing print so many times?
Learn about format strings and use triple quoted strings.
else:
print "Menu Selections: "
print "1 - Attack"
print "2 - Defend"
print
menu1 = """
Me
On Sat, Jul 31, 2010 at 1:51 PM, bob gailer wrote:
> On 7/30/2010 10:49 PM, Jason MacFiggen wrote:
>>
>> what can I do instead of writing print so many times?
>> import random
>> my_hp = 50
>> mo_hp = 50
>> my_dmg = random.randrange(1, 20)
>> mo_dmg = random.randrange(1, 20)
>> whil
On 7/30/2010 10:49 PM, Jason MacFiggen wrote:
what can I do instead of writing print so many times?
import random
my_hp = 50
mo_hp = 50
my_dmg = random.randrange(1, 20)
mo_dmg = random.randrange(1, 20)
while True:
if mo_hp < 0:
print "The Lich King has been
On Sat, 31 Jul 2010 12:49:36 pm Jason MacFiggen wrote:
> I am have trouble figuring out how to make my program stop at 0 hit
> points if I run it, it always goes into the negative hitpoints...
>
> So my question is how do I make this program end at exactly 0 hit
> points every time instead of g
On Fri, Jul 30, 2010 at 10:49 PM, Jason MacFiggen wrote:
> I am have trouble figuring out how to make my program stop at 0 hit
> points if I run it, it always goes into the negative hitpoints...
>
> So my question is how do I make this program end at exactly 0 hit points
> every time instead o
I am have trouble figuring out how to make my program stop at 0 hit
points if I run it, it always goes into the negative hitpoints...
So my question is how do I make this program end at exactly 0 hit points
every time instead of going over?
and also, what can I do instead of writing print so