I am trying to use random.choice for a text based game. I am using windows 7, 
64-bit python. Here is my code:

def lvl2():
    print "COMMANDER: Who should you train with?"
    trn=random.choice(1,2)
    if trn==1:
        lvl2_1()
        print "Squad One!"
    elif trn==2:
        lvl2_2()
        print "Squad Nine!"





Here is my error:

 File "C:\Users\Jack\Desktop\python\skye.py", line 20, in lvl2
    trn=random.choice(1,2)
TypeError: choice() takes exactly 2 arguments (3 given)
>>> 



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

Reply via email to