Help me in solving LB01E problem

My issue

How do we check the following?

Are both

A and

C odd?
Are both

A and

C even?
Is

A odd and

C even or vice versa?

Learning course: Logic Building in Python
Problem Link: Problem (Make Avg) - Solve sub-components Practice Problem in Logic Building in Python - CodeChef

@bhanushreea038
this will be the correct rearrangement

if A%2 == 0 and C%2 == 0:
    print('Both A and C are even')
elif A%2 != 0 and C%2 != 0:
    print('Both A and C are odd')
else:
    print('A is odd and C is even or vice versa')