On Jan 10, 2005, at 17:53, Kooser, Ara S wrote:
Does anyone have an suggestions, explanations, websites? Thanks.
Ara
import random
perc = raw_input("Please enter a threshold between 0-1. ") raw_input("Press return to make a world") PERSON, EMPTY = '*', '.'
def percolation(perc): randval = random.random() PERSON, EMPTY = '*', '.' if randval > perc: EMPTY if randval < perc: PERSON
I think the problem is there. The function doesn't return anything. Chances are you should use "return EMPTY" and "return PERSON" instead of what you have right now (have you been using Ruby recently?).
Also, the function still doesn't return anything when randwal == perc.
-- Max
maxnoel_fr at yahoo dot fr -- ICQ #85274019
"Look at you hacker... A pathetic creature of meat and bone, panting and sweating as you run through my corridors... How can you challenge a perfect, immortal machine?"
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor