[Tutor] Simple factorial program
Eddie
eddie9139 at gmail.com
Thu Jun 11 17:53:16 CEST 2009
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 [?]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090612/b4700543/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 96 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20090612/b4700543/attachment.gif>
More information about the Tutor
mailing list