#!/usr/bin/python3
"""
Purpose: Ternary operation usage 

Useful, when there is  one condition and two ways
"""
num1 = 10

# Method 1
if num1 % 2 == 0:
    print('Even')
else:
    print('Odd')

# Method 2
print('Even' if num1 % 2 == 0 else 'Odd')

print('non-zero' if num1 else 'zero')
print('non-zero' if num1 != 0 else 'zero')
print('non-zero' if not num1 != 0 else 'zero')


# conditon: success_case, failure_case

62ae127d854c9170f2efe0b98786b171c9f33b24
<mask token>

<mask token>
if num1 % 2 == 0:
    print('Even')
else:
    print('Odd')
print('Even' if num1 % 2 == 0 else 'Odd')
print('non-zero' if num1 else 'zero')
print('non-zero' if num1 != 0 else 'zero')
print('non-zero' if not num1 != 0 else 'zero')

<mask token>
num1 = 10
if num1 % 2 == 0:
    print('Even')
else:
    print('Odd')
print('Even' if num1 % 2 == 0 else 'Odd')
print('non-zero' if num1 else 'zero')
print('non-zero' if num1 != 0 else 'zero')
print('non-zero' if not num1 != 0 else 'zero')

#!/usr/bin/python3
"""
Purpose: Ternary operation usage 

Useful, when there is  one condition and two ways
"""
num1 = 10

# Method 1
if num1 % 2 == 0:
    print('Even')
else:
    print('Odd')

# Method 2
print('Even' if num1 % 2 == 0 else 'Odd')

print('non-zero' if num1 else 'zero')
print('non-zero' if num1 != 0 else 'zero')
print('non-zero' if not num1 != 0 else 'zero')


# conditon: success_case, failure_case
