[Tutor] Help with class example
yahufpontius at yahoo.com
Fri Oct 19 01:59:05 CEST 2012
I'm taking a beginners course on Python.
Have class example which is to be used in H/W, which I can't get to work.
Thus I figure the example is wrong. But I need this to get H/W done.
Using 'import random' and random.randrange in function, returning #.
def RandomNumberGen ():
if random.randrange(0, 2) == 0:
X return "tails"
Simple enough, but running in my Python 2.7.3 IDLE - it will not even run,
and give syntax (red char box) error at the X above.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor