Please read the following table in HTML format from a webpage and then answer the question in detail according to the table. Each table cell is defined by a <td> and a </td> tag. Each table row starts with a <tr> and ends with a </tr> tag. 'rowspan=m' and 'colspan=n' represents a cell spaning over 'm' rows and 'n' columns.

Webpage title:
List of Prime Ministers of Tanzania
Table title:
Prime Ministers of Tanzania
Table:
<table id='hittask' contenteditable='False'>
<tr> <th colspan=1 rowspan=2 > № </th><th colspan=1 rowspan=2 > Prime Minister (Birth–Death) </th><th colspan=1 rowspan=2 > Portrait </th><th colspan=2 rowspan=1 > Tenure </th><th colspan=2 rowspan=2 > Political affiliation (at time of appointment) </th><th colspan=1 rowspan=2 > President(s) </th></tr>
<tr> <th colspan=1 rowspan=1 > Took office </th><th colspan=1 rowspan=1 > Left office </th></tr>
<tr> <td colspan=8 rowspan=1 > Post abolished (1 November 1964 – 17 February 1972) </td></tr>
<tr> <th colspan=1 rowspan=2 > 1 </th><th colspan=1 rowspan=2 > Rashidi Kawawa (1924–2009) </th><td colspan=1 rowspan=2 > - </td><td colspan=1 rowspan=2 > 17 February 1972 </td><td colspan=1 rowspan=2 > 13 February 1977 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Tanganyika African National Union </td><td colspan=1 rowspan=1 > Nyerere </td></tr>
<tr> <td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Nyerere </td></tr>
<tr> <th colspan=1 rowspan=1 > 2 </th><th class="highlighted"  colspan=1 rowspan=1 > Edward Sokoine (1938–1984) </th><td colspan=1 rowspan=1 > - </td><td class="highlighted"  colspan=1 rowspan=1 > 13 February 1977 </td><td class="highlighted"  colspan=1 rowspan=1 > 7 November 1980 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Nyerere </td></tr>
<tr> <th colspan=1 rowspan=1 > 3 </th><th colspan=1 rowspan=1 > Cleopa Msuya (1931–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 7 November 1980 </td><td colspan=1 rowspan=1 > 24 February 1983 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Nyerere </td></tr>
<tr> <th colspan=1 rowspan=1 > (2) </th><th class="highlighted"  colspan=1 rowspan=1 > Edward Sokoine (1938–1984) </th><td colspan=1 rowspan=1 > - </td><td class="highlighted"  colspan=1 rowspan=1 > 24 February 1983 </td><td class="highlighted"  colspan=1 rowspan=1 > 12 April 1984 (died in office.) </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Nyerere </td></tr>
<tr> <th colspan=1 rowspan=1 > 4 </th><th colspan=1 rowspan=1 > Salim Ahmed Salim (1942–) </th><td colspan=1 rowspan=1 > Salim.JPG </td><td colspan=1 rowspan=1 > 24 April 1984 </td><td colspan=1 rowspan=1 > 5 November 1985 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Nyerere </td></tr>
<tr> <th colspan=1 rowspan=1 > 5 </th><th colspan=1 rowspan=1 > Joseph Warioba (1940–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 5 November 1985 </td><td colspan=1 rowspan=1 > 9 November 1990 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Mwinyi </td></tr>
<tr> <th colspan=1 rowspan=1 > 6 </th><th colspan=1 rowspan=1 > John Malecela (1934–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 9 November 1990 </td><td colspan=1 rowspan=1 > 7 December 1994 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Mwinyi </td></tr>
<tr> <th colspan=1 rowspan=1 > (3) </th><th colspan=1 rowspan=1 > Cleopa Msuya (1931–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 7 December 1994 </td><td colspan=1 rowspan=1 > 28 November 1995 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Mwinyi Mkapa </td></tr>
<tr> <th colspan=1 rowspan=1 > 7 </th><th colspan=1 rowspan=1 > Frederick Sumaye (1950–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 28 November 1995 </td><td colspan=1 rowspan=1 > 30 December 2005 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Mkapa Kikwete </td></tr>
<tr> <th colspan=1 rowspan=1 > 8 </th><th colspan=1 rowspan=1 > Edward Lowassa (1953–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 30 December 2005 </td><td colspan=1 rowspan=1 > 7 February 2008 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Kikwete </td></tr>
<tr> <th colspan=1 rowspan=1 > 9 </th><th colspan=1 rowspan=1 > Mizengo Pinda (1948–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 9 February 2008 </td><td colspan=1 rowspan=1 > 5 November 2015 </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Kikwete </td></tr>
<tr> <th colspan=1 rowspan=1 > 10 </th><th colspan=1 rowspan=1 > Kassim Majaliwa (1961–) </th><td colspan=1 rowspan=1 > - </td><td colspan=1 rowspan=1 > 20 November 2015 </td><td colspan=1 rowspan=1 > Incumbent </td><td colspan=1 rowspan=1 >  </td><td colspan=1 rowspan=1 > Chama Cha Mapinduzi </td><td colspan=1 rowspan=1 > Magufuli </td></tr>
</table>
Question:
When was Edward Sokoine serve as the prime minister of Tanzania?
Answer:
Edward Sokoine (1938 – 1984) was a two-term prime minister of Tanzania, serving from 13 February 1977 to 7 November 1980 and again from 24 February 1983 to 12 April 1984.