Write a function to calculate the energy efficiency of a device based on given parameters.
Define efficiency as (useful_energy / input_energy) * 100. Return the result as a floating-point percentage.
Use the signature def calculate_efficiency(input_energy, useful_energy):. Both parameters are numeric, input energy is positive, and useful energy is nonnegative.
def calculate_efficiency(input_energy, useful_energy):