I already have the calculations part down but the output is what I'm struggling with. Here is a screenshot of my assignment with instructions for output format on right and code errors at the bottom

I already have the calculations part down but the output is what I'm struggling with. Here is a screenshot of my assignment with instructions for output format on right and code errors at the bottom

I recommend reviewing string formatting in Python. This should do the job for the scenario you provided:
print(f"{x} months is {y} years and {m} months")