I would like to convert decimal degrees into sexagesimal degrees, at the level of calculations I based myself on this site and this is my code
def dec_dms(deg, dec):
mnt = dec * 60
dec = mnt%1
mnt = mnt - dec
dec = dec * 60
return deg, mnt, dec
print(dec_dms(12,345))
>>>(12, 20700, 0)
the problem is the result which should be (12, 20, 42) Can you help me please ?