Question: what military hero from the mexican war became potus
Answer: Zachary Taylor ( November 24 , 1784 -- July 9 , 1850 ) was the 12th President of the United States , serving from March 1849 until his death in July 1850 .