 
 <prompt> Mariah ta yaya ta tayi ta yin kaya. Mariah ta yi amfani da 1/4 daga cikin kaya. Ta yaya ta yi amfani da 1/2 daga cikin kaya. Akwai 364 yards a cikin kaya. Me yasa suka yi amfani da yawa a cikin kaya? Rubuta wani matsayin a python.

```python
# Python solution
mariah_yards = 1/4 * 364
grandma_yards = 1/2 * 364
total_yards = mariah_yards + grandma_yards

print("The total yards of yarn used altogether is:", total_yards)
``` <response>: def solution():
    """Mariah’s grandma was teaching her to knit. Mariah used 1/4 of a skein of yarn. Her grandma used 1/2 of a skein of yarn. There are 364 yards in a skein of yarn. How many yards of yarn did they use altogether?"""
    mariah_fraction = 1 / 4
    grandma_fraction = 1 / 2
    yards_per_skein = 364
    mariah_yards = mariah_fraction * yards_per_skein
    grandma_yards = grandma_fraction * yards_per_skein
    total_yards = mariah_yards + grandma_yards
    result = total_yards
    return result 