 
 <prompt> Mia da Emma suna 16 na shekaru a cikin kowace. Idan Mia, wacce itace ta fi Emma, ta kasance 40 na shekaru, me ya sa aka ambata shekaru na duka? Yi amfani da python code. <response>: def solution():
    """Mia da Emma suna 16 na shekara a cikin rayuwa. Idan Mia, wacce itace ta farko da Emma, ta kasance 40 na shekara, me ya sa aka nemi jerin rayuwar su?"""
    mia_age = 40
    age_difference = 16
    emma_age = mia_age + age_difference
    average_age = (mia_age + emma_age) / 2
    result = average_age
    return result 