[Tutor] Program not accessing while loops
Aaron
wildchild07770@yahoo.com
Mon, 30 Apr 2001 15:54:42 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C0D18D.DEF0F0A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi, I wrote this out last night on a different computer and I had the =
script running fine but now that I rewrote it doesn't seem to be =
accesing the second group of while loops, the main menu will load and =
keep running and asking for input, but it won't call on the loop.
#character managment program
totop =3D 1
while totop =3D=3D 1:
print
print "Main Menu"
print "---------"
print
mainmenu =3D ["1 for to create a new character", "2 to manage an =
existing character", "3 to exit the program"]
for x in mainmenu:
print "Enter", x
mainmen =3D raw_input(">")
while mainmen =3D=3D 1:
print "This function is under construction"
while mainmen =3D=3D 2:
print "This function is under construction"
while mainmen =3D=3D 3:
exit =3D raw_input("are you sure? ")
if exit =3D=3D r"yes":
totop =3D=3D 2
break
elif exit =3D=3D r"no":
totop =3D=3D 1
break
while mainmen < 3:
print "Invalid choice, choose again"
for x in mainmenu:
print "Enter", x
mainmen =3D raw_input(">")
Thanks, aaron
------=_NextPart_000_0007_01C0D18D.DEF0F0A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.100" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi, I wrote this out last night on =
a different=20
computer and I had the script running fine but now that I rewrote =
it=20
doesn't seem to be accesing the second group of while loops, the main =
menu will=20
load and keep running and asking for input, but it won't call on the=20
loop.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>#character managment program<BR>totop =
=3D 1<BR>while=20
totop =3D=3D 1:<BR> print<BR> print =
"Main=20
Menu"<BR> print "---------"<BR> =20
print<BR> mainmenu =3D ["1 for to create a new =
character", "2 to=20
manage an existing character", "3 to exit the =
program"]<BR> =20
for x in mainmenu:<BR> print =
"Enter",=20
x<BR> mainmen =3D =
raw_input(">")<BR> while=20
mainmen =3D=3D 1:<BR> print =
"This function=20
is under construction"<BR> while mainmen =3D=3D=20
2:<BR> print "This function is =
under=20
construction"<BR> while mainmen =3D=3D=20
3:<BR> exit =3D raw_input("are =
you sure?=20
")<BR> if exit =3D=3D=20
r"yes":<BR> &n=
bsp;=20
totop =3D=3D =
2<BR> =20
break<BR> elif exit =3D=3D=20
r"no":<BR> &nb=
sp;=20
totop =3D=3D =
1<BR> =20
break<BR> while mainmen <=20
3:<BR> print "Invalid choice, =
choose=20
again"<BR> for x in=20
mainmenu:<BR> =
=20
print "Enter", x<BR> mainmen =
=3D=20
raw_input(">")</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks, =
aaron</FONT></DIV></BODY></HTML>
------=_NextPart_000_0007_01C0D18D.DEF0F0A0--