👉 In mathematics, a ternary number is a type of base-3 number in which each digit (base 10) represents a power of 3. In other words, it can be represented as 3 raised to the power of its position. For example, the ternary representation of 9 is 9^2 = 81. Here's how you can define a terned number in Python: ```python def terned(num): """ Return the terned