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 scientist"sure would be a lot easier to refer
> to that instead of tying up this forum with questions a
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! Fa
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
>>
>
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 wi
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:
de
"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 i
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
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">&g