Re: while within while

2007-10-29 Thread cokofreedom
On Oct 29, 4:28 pm, [EMAIL PROTECTED] wrote: > On Oct 29, 9:26 am, Steven D'Aprano <[EMAIL PROTECTED] > > > > cybersource.com.au> wrote: > > On Sun, 28 Oct 2007 21:02:02 -0400, Shawn Minisall wrote: > > > Thanks a lot for your suggestions. Unfortunately, a lot of the issues > > > brought up were s

Re: while within while

2007-10-29 Thread kyosohma
On Oct 29, 9:26 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 28 Oct 2007 21:02:02 -0400, Shawn Minisall wrote: > > Thanks a lot for your suggestions. Unfortunately, a lot of the issues > > brought up were simply the way I was taught by my professor and the way > > sh

Re: while within while

2007-10-29 Thread Steven D'Aprano
On Sun, 28 Oct 2007 21:02:02 -0400, Shawn Minisall wrote: > Thanks a lot for your suggestions. Unfortunately, a lot of the issues > brought up were simply the way I was taught by my professor and the way > she wants things done,having to use a numbered menu as opposed to > entering r, p or s, bei

Re: while within while

2007-10-28 Thread Shawn Minisall
Thanks a lot for your suggestions. Unfortunately, a lot of the issues brought up were simply the way I was taught by my professor and the way she wants things done,having to use a numbered menu as opposed to entering r, p or s, being taught just to use one main function for the entire program,

Re: while within while

2007-10-28 Thread Tony
Shawn Minisall wrote: also, surely it should be paper covers rock? Tony -- http://mail.python.org/mailman/listinfo/python-list

Re: while within while

2007-10-27 Thread Tony
On Oct 27, 7:11 pm, Shawn Minisall <[EMAIL PROTECTED]> wrote: > snip > > import random > > def main(): > > #define and initialize variables > #choice as int > choice = 0 > #weapon choice as int > weaponchoice = 0 > #number of wins > win = 0 > #number of loses > l

Re: while within while

2007-10-27 Thread Steven D'Aprano
On Sat, 27 Oct 2007 15:11:37 -0400, Shawn Minisall wrote: > I've been having some problems with using a while statement for one menu > within another while statement for the main menu, first time I've done > it. [snip] > def main(): [and snip masses and masses of code] The first thing you sh

Re: while within while

2007-10-27 Thread J. Cliff Dyer
Shawn Minisall wrote: > K I've since fixed the UnboundLocalError: local variable 'ai' referenced > before assignment error, I forgot to include decision = (1, 2, 3) inside > " " for each number. > > You mean like decision = ("1", "2", "3") ? I don't think that would have caused the error you

while within while

2007-10-27 Thread Shawn Minisall
K I've since fixed the UnboundLocalError: local variable 'ai' referenced before assignment error, I forgot to include decision = (1, 2, 3) inside " " for each number. Now when I run it, I get this.. >>> main() READY TO PLAY ROCK, PAPER, SCISSORS??? Please choose from the following menu: 1. Se

while within while

2007-10-27 Thread Shawn Minisall
I've been having some problems with using a while statement for one menu within another while statement for the main menu, first time I've done it. It's with choice number two from the menu. When I run the program, I get a UnboundLocalError: local variable 'ai' referenced before assignment.