Help please
khaosyt at gmail.com
khaosyt at gmail.com
Mon Apr 1 01:41:32 EDT 2013
On Monday, April 1, 2013 1:24:52 AM UTC-4, Chris Angelico wrote:
> On Mon, Apr 1, 2013 at 4:15 PM, <khaosyt at 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.
More information about the Python-list
mailing list