Re: [Tutor] random.choice() problem

2013-06-23 Thread Peter Otten
Dave Angel wrote: > On 06/23/2013 02:18 AM, Jack Little wrote: >> 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==

Re: [Tutor] random.choice() problem

2013-06-23 Thread Dave Angel
On 06/23/2013 02:18 AM, Jack Little wrote: 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 "S

Re: [Tutor] random.choice() problem

2013-06-22 Thread Steven D'Aprano
On 23/06/13 16:18, Jack Little wrote: 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) [...] Here is my error: File "C:\Users\Jack\Deskto

[Tutor] random.choice() problem

2013-06-22 Thread Jack Little
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()