<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def temperature(temp: Number, unit: str = 'C') -> str: """ Formats a temperature element into a string with both C and F values Used for both Temp and Dew Ex: 34°C (93°F) """

    unit = unit.upper()
    if not (temp and unit in ('C', 'F')):
        return ''
    if unit == 'C':
        converted = temp.value * 1.8 + 32
        converted = str(int(round(converted))) + '°F'  # type: ignore
    elif unit == 'F':
        converted = (temp.value - 32) / 1.8
        converted = str(int(round(converted))) + '°C'  # type: ignore
    return f'{temp.value}°{unit} ({converted})'