Sobes.tech
Intern — Senior

Determining the parity of an integer

livecode

Task condition

What will be the result of a function that checks the evenness of the input value? The function is declared as:

def div2(num: int) -> bool:
    return num % 2 == 0

if div2(value):
    ...

Describe what will be returned when calling div2 and how the conditional operator uses its result.