is not generally considered Pythonic, since ... if ... else ... is an expression and you're throwing away the value that the expression produces (always None). You can use print("Yes" if x == 1 else "No") which is Pythonic since the value of the conditional expression is used as the argument to print.

The form

return total if x == 1 else return half

cannot work since return is a statement and must occur at the beginning of a logical line. Instead, use

return total if x == 1 else half

(which is parsed the same as return (total if x == 1 else half)).

The code

print(total) if x == 1 else print(half) if x == 2

wouldn't work either - the conditional expression is ... if ... else ..., i.e. each if must be paired with an else that follows it; your second if is missing the else clause; you could use