Portrait of Henry VIII
There have been 66 monarchs of England and Britain spread over a period of 1500 years.
For this Python challenge you will use a text file listing all of these monarchs in chronological order. You will then write a Python program to prompt the user to enter a year (between 757 and 2017) and your program will look up for the name of the monarch of England at the given date.
To complete this challenge you will need to read more about how to read through a CSV file.
The text file we will use contains one line per monarch. On each line it stores the year the reign started, the year it ended and the name of the monarch as follows:
Complete the Code
Once you have completed the code check that it produces the expected output by performing the following tests:
Edward the Confessor
|Ethelred II the Unready
Edmund lronsideCnut (Canute)
Tweak the output of your program so that when giving the name of the monarch matching the year entered, your program also mentions who were the previous monarch and the next monarch.
For instance the output of the program could be: