Task: Text to Code
Input (English): What is the average life expectancy in African countries that are republics?
Output (English): SELECT avg(LifeExpectancy) FROM country WHERE Continent  =  "Africa" AND GovernmentForm  =  "Republic"