Re: back with more issues

2013-08-12 Thread Kris Mesenbrink
the Classes and __init__ still don't make much sense actually. i have tried and tried again to make it generate numbers between 0 and 5 in a while statement but it just doesn't seem to be working. import random class Player(): hp = 10 def __init__(self, patt): self.att = rando

Re: back with more issues

2013-08-12 Thread Kris Mesenbrink
import random class player(): hp = 10 attack = random.randint(0,5) class monster(): hp = 10 attack = random.randint(0,4) def battle(): print ("a wild mosnter appered!") print ("would you like to battle?") answer = input() if answer == ("yes"): while monst

Re: back with more issues

2013-08-11 Thread Kris Mesenbrink
darn i was hoping i could put off learning classes for a bit, but it seems that is not the case. i have tested it a bit and it seems to be working correctly now. import random class player(): hp = 10 speed = 5 attack = random.randint(0,5) print (player.

Re: back with more issues

2013-08-11 Thread Kris Mesenbrink
the idea was to store variables for later use, but you are correct i don't understand functions or if that is even the best way to do it. i guess i'd want to be able to call the HP and ATTACK variables of player for when the battle gets called. i would then use the variables in battle to figure

back with more issues

2013-08-11 Thread Kris Mesenbrink
import random def player(): hp = 10 speed = 5 attack = random.randint(0,5) def monster (): hp = 10 speed = 4 def battle(player): print ("a wild mosnter appered!") print ("would you like to battle?") answer = input() if answer == ("yes"): return player(

Re: Issues with if and elif statements in 3.3

2013-08-08 Thread Kris Mesenbrink
WOW as if it was something as easy as that,i had been looking for awhile on what i was doing wrong. as it seems i just don't know my way around if statements at all, thank a bunch for this. makes everything else i have been code work thanks again -- http://mail.python.org/mailman/listinfo/pyt