Hello,
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 #.

import random

def RandomNumberGen ():
        if random.randrange(0, 2) == 0:
             X  return "tails"
        return "heads"


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.

Frank

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to