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 > lose = 0 > #number of ties > tie = 0 > #number of rounds > rounds = 0 > #play again loop > again = "no" > snip
In Python, you usually don't need to define your variables in advance. Choice is determined as a number by your use of input() and the response of the user, and in other code it could later be changed to another type. So your initial declaration was unnecessary.'Dynamic typing' its called, one of the joys of the language compared to Java, C etc.. So not doing that would make your code a bit simpler, one less thing to worry about Tony -- http://mail.python.org/mailman/listinfo/python-list