Time calculator help

I need help with the time calculator with Python, specifically regard to determining AM or PM for result. I have calculated the time result but i still have no clue.

https://fcc-time-calculator.vien2024.repl.run

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.89 Safari/537.36.

Challenge: Time Calculator

Link to the challenge:

I convert the start time to 24 hours clock and then convert it back to 12 hour clock after doing the calculations:
hours_12_to_24 = {
‘1’: ‘13’, ‘2’: ‘14’, ‘3’: ‘15’, ‘4’: ‘16’,
‘5’: ‘17’, ‘6’: ‘18’, ‘7’: ‘19’, ‘8’: ‘20’,
‘9’: ‘21’, ‘10’: ‘22’, ‘11’: ‘23’, ‘00’: ‘24’
}