Thanks, that is my problem.

With that code, why is it giving an error  (indenting?) at the end of* for
number in range(number, 1) *?

2009/6/12 vince spicer <vinces1...@gmail.com>

> did you declare factorial before trying to use it?
>
> factorial = 1
> print "Factorial finder"
> number = int(input("Please enter a non-negative integer: "))
> for number in range(number, 1)
>     factorial = (factorial * number)
>
> print "Factorial:", factorial
>
> On Thu, Jun 11, 2009 at 9:53 AM, Eddie <eddie9...@gmail.com> wrote:
>
>> I'm trying to write a simple factorial program and am unsure at what is
>> wrong with it. Why Can't I go *factorial = factorial * number* where
>> factorial and number are both integers?
>>
>> #Factorial program
>>
>> print "Factorial finder"
>> number = input("Please enter a non-negative integer: "
>>     for number in range(number, 1)
>>     factorial = (factorial * number)
>>
>> print "Factorial:", factorial
>>
>> Thanks Eddie [?]
>>
>>
>> _______________________________________________
>> Tutor maillist  -  Tutor@python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
>

<<330.gif>>

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to