Which of the following is a function of a heat engine? a. It converts chemical energy to mechanical energy.b. It converts thermal energy to mechanical energy.c. It converts mechanical energy to chemical energy.d. It converts thermal energy into chemical energy.