I put in a 4 and expected 24, and instead got 12. It is supposed to give 4! 
not 4*3.
---------------------------------------------------------------
Early to bed,
Early to rise,
Makes a man healthy, wealthy, and wise.
--Benjamin Franklin
-------------------------------------------------------------------
----- Original Message ----- 
From: "Alan G" <[EMAIL PROTECTED]>
To: "Nathan Pinno" <[EMAIL PROTECTED]>; "Tutor mailing list" 
<[email protected]>
Sent: Monday, August 15, 2005 2:20 AM
Subject: Re: [Tutor] How can I make this run right?


>> 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?
>
> So give is a clue! What is it doing wrong? Is there an error message?
> What output did you expect? What did you get?
>
> Without that information we have to read the code and guess what you
> were trying to do. Then try to guess what might be different to what
> you expected.
>
> Alan G.
> 
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to