Question
Answered step-by-step

INSTRUCTIONS :1) Python Programming 2) No use use of built in libraries and built in functions

3) Use comment out for understanding better.

4) Use Functions name and parameter name is same as given in question.

Image transcription text

A data set of emperors along with their years they died have been given in a text file attached with this document. Write a function SortEmpire() that takes list of objects of empire. The object consists of empire name and the year. The function should return a python list of containing objects in chronological order. The complete task should be executed in O(n). File Format Each line of the file contains two values N and Y separated by comma. N is the name of the emperors and Y is the year they died. Sample File: Tsiimba Mukuumbi, 1894 Cyrus the Great, 530 Bardiya, 522 Xerxes I, 486 Bivula Bangi, 1929 def SortEmpire (file) : // your code goes here Example : print (SortEmpire ("emperors . txt" ) ) #the function should return Xerxes I, 486 Bardiya, 522 Cyrus the Great, 530 Tsiimba Mukuumbi, 1894 Bivula Bangi, 1929

... Show more

Answer & Explanation
Verified Solved by verified expert
<p>ce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur laoreet. Nam risus ante, dapibus a molestie consequat</p> Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet

Unlock full access to Course Hero

Explore over 16 million step-by-step answers from our library

Subscribe to view answer
risus ante, dapibus a molestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus
Step-by-step explanation
16304970
lestie consequat, ultrices ac magna. Fusce dui lectus, congue vel laoreet ac, dictum vitae odio. Donec aliquet. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam lacinia pulvinar tortor nec facilisis. Pellentesque dapibus efficitur lao
1 Attachment
g92.png
png