On Sep 6, 10:29 am, David Barr <[EMAIL PROTECTED]> wrote:
> yields no results.

Since every response so far has answered everything __Except The
Question You Asked__, your code runs fine on my Linux machine and
prints 15.  The error may be before this bit of code so it isn't
getting called.  Add some print statements and try again

def d6(i):
     print "start of d6()"
     roll = 0
     count = 0
     while count <= i:
         print "d6 count =", count, "of", i
         roll = roll + random.randint(1,6)
         count += 1

     print "returning roll =", roll
     return roll

print d6(3)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to