<prompt> Translate the following text to SwahiliHe seemed to fluctuate between bitter sureness of doom and a stupidly optimistic belief that something could be done to avert that doom.  <response>: Alionekana kuwa anabadilika-badilika kati ya uhakika mkali wa kifo na imani ya kipumbavu ya matumaini kwamba jambo fulani laweza kufanywa ili kuepuka kifo hicho. 