On Monday, April 1, 2013 1:24:52 AM UTC-4, Chris Angelico wrote:
> On Mon, Apr 1, 2013 at 4:15 PM,  <khao...@gmail.com> wrote:
> 
> >     integer = input("Enter a positive integer: ")
> 
> >     again = raw_input("Again? (Y/N): ")
> 
> 
> 
> Okay, the first thing I'm going to say is: Don't use input() in Python
> 
> 2. It's dangerous in ways you won't realize. Use int(raw_input(...))
> 
> for something like this, which will guarantee you an integer.
> 
> 
> 
> I'm guessing this is homework. Please be honest about that; we'll help
> 
> you learn but won't just give you the answers.
> 
> 
> 
> All you need to do is initialize something to zero, and then keep
> 
> adding 'number' onto it in the loop. You should be able to sort that
> 
> out.
> 
> 
> 
> ChrisA

Elaborate, please.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to