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
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
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
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
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 ==
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
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
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