Granular Interview Question

create a function to convert units