how to think like a computer scientist

2005-11-15 Thread john boy
Does anyone know if there is an "answer key" to all of the exercises in "how to think like a computer scientist"sure would be a lot easier to refer to that instead of tying up this forum with questions about exercises I'm sure that have been asked before Yahoo! FareCha

Re: how to think like a computer scientist

2005-11-15 Thread Simon Brunning
On 14/11/05, john boy [EMAIL PROTECTED] wrote: Does anyone know if there is an answer key to all of the exercises in how to think like a computer scientistsure would be a lot easier to refer to that instead of tying up this forum with questions about exercises I'm sure that have been asked

Re: how to think like a computer scientist

2005-11-13 Thread Brian van den Broek
john boy said unto the world upon 2005-11-11 22:25: Question for the following program: sec 5.5 def factorial (n): if n == 0: return 1 else: recurse = factorial (n-1) result = n * recurse return result How come whenever I state the function with n given

Re: how to think like a computer scientist

2005-11-13 Thread Colin J. Williams
Brian van den Broek wrote: john boy said unto the world upon 2005-11-11 22:25: Question for the following program: sec 5.5 def factorial (n): if n == 0: return 1 else: recurse = factorial (n-1) result = n * recurse return result How come whenever I

how to think like a computer scientist

2005-11-11 Thread john boy
Question for the following program: sec 5.5 def factorial (n): if n == 0: return 1 else: recurse = factorial (n-1) result = n * recurse return result How come whenever I state the function with "n" given a value it prints no results in the interpreter for EX: def factorial (n): if n ==

how to think like a computer scientist

2005-11-06 Thread john boy
Ok...I'm new to Python..and of course am already having troubles. I have tried the following example from "how to think like a computer scientist" def newline(): print print "firstline" newline() print "secondline" problem iswhenever I type -print "fi

how to think like a computer scientist

2005-11-06 Thread john boy
I am using the book "how to think like a computer scientist" and am finding the examples are not working with Python 2.4.2...I have typed them exactly as they appear in the textcan someone relate to this?...is this typical b/c 2.4.2 is a newer version? -xray- Yahoo! FareChas

Re: how to think like a computer scientist

2005-11-06 Thread Fredrik Lundh
john boy wrote: I am using the book how to think like a computer scientist and am finding the examples are not working with Python 2.4.2...I have typed them exactly as they appear in the textcan someone relate to this?...is this typical b/c 2.4.2 is a newer version? no. did you read