I have written the following code:-
N=int(input())
a=[]
sumodd=0
sumeven=0
for x in range(0,N):
a.append(input())
b=a[x]
if(int(b[x])%2==0):
sumeven+=int(b[x])
else:
sumodd+=int(b[x])
if((sumeven%4==0)or(sumodd%3==0)):
print("Yes")
else:
print("No")
The code seems to be working fine in the IDLE, but shows the following error on HackerBlocks:-
Traceback (most recent call last):
File "source", line 1, in <module>
N=int(input())
ValueError: invalid literal for int() with base 10: 'undefined'
Kindly help me out, I am just a beginner.