Help me in solving LB01E problem

My issue

Rearrange the following code
elif A%2 != 0 and C%2 != 0:
else:
if A%2 == 0 and C%2 == 0:
print(‘Both A and C are even’)
print(‘A is odd and C is even or vice versa’)
print(‘Both A and C are odd’)

Learning course: Problem solving in Python
Problem Link: Problem (Make Avg) - Solve sub-components in Problem solving in Python

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')

The modulus operator checks the remainder, in case of even numbers if they’re divided by 2 the remainder comes out to be 0 (if A%2==0) and vice versa for odd numbers.