I am trying to execute the above code using Python 2.7. I get EOFError.
def perfectNumberCheck(num):
sum = 0
for i in range(1, num):
if num % i == 0:
sum = sum + i
if sum == num:
print('1')
else:
print('0')
num = int(raw_input('come on dude:'))
perfectNumberCheck(num)
I have no problem in Python 3 but need to submit the assignment in Python 2.