Re: [Tutor] tic tac toe

2011-02-20 Thread bob gailer
On 2/20/2011 9:49 AM, Ben Ganzfried wrote: Thanks, Bob. I'd love some specific feedback. Exactly what did I offer that you found useful? Also please always reply-all so a copy goes to the list. -- Bob Gailer 919-636-4239 Chapel Hill NC ___ Tutor

Re: [Tutor] Tic-Tac-Toe

2011-02-19 Thread bob gailer
I got stimulated to create a minimal tic-tac-toe program. No functions, no classes. board = [" "]*9 player = 'X' prompt = "Player %s cell #, Q=quit, B=display board>" while True: cell = raw_input(prompt % player) if cell in 'qQ': break elif cell in 'bB': print ('+---+' + '\n|%s%s%s|'*3

Re: [Tutor] Tic-Tac-Toe

2011-02-19 Thread Alan Gauld
"Ben Ganzfried" wrote if (cell % 3 == 0) and (self.__mycells[cell] == self.__mycells[cell + 1]) and (self.__mycells[cell + 1]== self.__mycells[cell + 2]): TypeError: unsupported operand type(s) for %: 'instance' and 'int' The error is in the first expression and the message tells you wha

Re: [Tutor] Tic-Tac-Toe

2011-02-19 Thread bob gailer
On 2/19/2011 3:49 PM, Ben Ganzfried wrote: Hey, I *think* that everything is working except my function gameWon. I keep getting the following error: " line 67, in gameWon if (cell % 3 == 0) and (self.__mycells[cell] == self.__mycells[cell + 1]) and (self.__mycells[cell + 1]== self.__myc

[Tutor] Tic-Tac-Toe

2011-02-19 Thread Ben Ganzfried
Hey, I *think* that everything is working except my function gameWon. I keep getting the following error: " line 67, in gameWon if (cell % 3 == 0) and (self.__mycells[cell] == self.__mycells[cell + 1]) and (self.__mycells[cell + 1]== self.__mycells[cell + 2]): TypeError: unsupported operand

Re: [Tutor] tic tac toe

2008-07-04 Thread bhaaluu
On Fri, Jul 4, 2008 at 12:14 PM, Akanskha Kumar <[EMAIL PROTECTED]> wrote: > how can i make tic tac toe game using python programing. > There is an excellent tic-tac-toe tutorial in Michael Dawson's book, Python Programming for the Absolute Beginner Second Edition (ISBN-13: 978-1-59863-112-8).Chap

Re: [Tutor] tic tac toe

2008-07-04 Thread Alan Gauld
"Akanskha Kumar" <[EMAIL PROTECTED]> wrote how can i make tic tac toe game using python programing. Do you know how to program at all? How much Python do you know? Is this a homework assignment? We need to know of these before we can give you the best answer. If you are experienced uin prog

[Tutor] tic tac toe

2008-07-04 Thread Akanskha Kumar
how can i make tic tac toe game using python programing.  ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor