Answer
As a civil servant, Zhang Heng began his career in the government, where he demonstrated his administrative and bureaucratic skills. He later shifted his focus to the study of astronomy, mathematics, and other scientific disciplines, making significant contributions to these fields.