[Tutor] Modifying game of life

Kooser, Ara S askoose at sandia.gov
Mon Jan 10 20:29:38 CET 2005


Kent and Max. Thank you very much. It works fine now. 

Ara



perc = raw_input("Please enter a threshold between 0-1.  ")
perc = float(perc)

def percolation(perc):
    randval = random.random()
    print randval
    PERSON, EMPTY = '*', '.'
    if randval > perc:
        EMPTY
        return EMPTY
    elif randval < perc:
        PERSON
        return PERSON
    elif randval == perc:
        PERSON
        return PERSON




More information about the Tutor mailing list