Answer:
He wrote it after he finished his travels, in the court of a Sultan in Morocco is the correct answer.
Explanation:
Ibn Batuta was a Muslim explorer who traveled around the medieval world. He spent more than twenty years doing so, and as a result of these trips, he wrote "A Gift to Those Who Contemplate the Wonders of Cities and the Marvels of Traveling."
The first draft was dictated to Ibn Juzzay (Batuta had already worked with him) by recomendation of Abu Inan Faris, ruler of Morocco.
First appendectomy because that’s the surgery they wanted to do and they decided to do