perfect!)
I am asking for help writing it. I am new to programming. Lost alot of
brain matter.
On Thu, Dec 1, 2011 at 3:22 PM, Alan Gauld wrote:
> On 01/12/11 21:17, Michael Hall wrote:
>
>> Can anyone else help with this question?
>>
>
> Sure lots of us could help. But Dave&
Can anyone else help with this question?
On Thu, Dec 1, 2011 at 12:17 PM, Dave Angel wrote:
> (You top-posted, so I'm deleting all the out-of-order stuff. in these
> forums, you should put your response after whatever you quote.)
>
>
> On 12/01/2011 02:55 PM, Michael Hal
> privately to me. Please use Reply-All, or whatever the equivalent is on
> your email app)
>
>
> On 12/01/2011 11:49 AM, Michael Hall wrote:
>
>> On Thu, Dec 1, 2011 at 7:51 AM, Dave Angel wrote:
>>
>> On 12/01/2011 10:33 AM, Michael Hall wrote:
>>>
>
Here is the code I have written.
# Create main function.
def main():
a = input('Please Enter a Number: ') # Ask user for input.
number = int(a)
x = 1
sum_of = 0
while number > x:
if number % x == 0:
sum_of = sum_of + x
x += 1
if sum_of == number: