[Tutor] How can I make this run right?

Nathan Pinno falcon3166 at hotmail.com
Mon Aug 15 08:22:14 CEST 2005


The following code is supposed to take in a number, and print number!:
n = int(raw_input("Number: "))
x = n-1
while 1:
    t = n*x
    while x > 1:
        x -= 1
    else:
        break
print t

Why isn't it working, and how can I make it print out the correct output?

Thanks in advance,
Nathan
---------------------------------------------------------------
Early to bed,
Early to rise,
Makes a man healthy, wealthy, and wise.
--Benjamin Franklin
-------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050815/3f052789/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Pinno, Nathan Paul.vcf
Type: text/x-vcard
Size: 783 bytes
Desc: not available
Url : http://mail.python.org/pipermail/tutor/attachments/20050815/3f052789/PinnoNathanPaul.vcf


More information about the Tutor mailing list