Header Ads

Header ADS

1074.Even or odd in python

This is the solution of this problem in python:

N=int(input())
L=list()
if(N<10000):
    for i in range(0,N):
        V=int(input())
        L.append(V)
for i in range(0,N):
    if(L[i]%2==0 and L[i]>0):
        print("EVEN POSITIVE")
    elif(L[i]%2==0 and L[i]<0):
        print("EVEN NEGATIVE")
    elif(L[i]%2!=0 and L[i]<0):
        print("ODD NEGATIVE")
    elif(L[i]%2!=0 and L[i]>0):
        print("ODD POSITIVE")
    elif(L[i]==0):
        print("NULL")
       

No comments

Powered by Blogger.