Back

CODEKATA ODD/EVEN/ZERO got test case fail

Created 3 years ago
226 Views
4 Comments
santhosh_Amigo
@santhosh_Amigo
santhosh_Amigo
@santhosh_AmigoProfile is locked. Login

You are provided with a number check whether it’s odd or even. 

Print "Odd" or "Even" for the corresponding cases.

Note: In case of a decimal, round off to nearest integer and then find the output. In case the input is zero, print "Zero".

Input Description:
A number is provided as the input.

Output Description:
Find out whether the number is odd or even. Print "Odd" or "Even" for the corresponding cases. Note: In case of a decimal, round off to nearest integer and then find the output. In case the input is zero, print "Zero".

Sample Input:
2

Sample Output:
Even

N=int (input ())
if N==0:			
    print("zero")		
elif N%2==0:		
    print("even")		
else:
    print("odd")	

Here the logic i have used is correct i got output in my IDE while using in CODEKATA the testcase was got fail. Someone Help me regarding this

Comments (4)
Please login to comment.