Extend the program in Figure 12. Your answer must be written in Python.
The program should get the user to enter a city and perform a linear search on the list capitals to find if the city is in the list or not.
The program should:
True if the city is foundFalse if the city is not found.You must write your own linear search routine and not use any built-in search function/operator (such as in, index(), or count()) on the list to perform the search.
You should use indentation as appropriate, meaningful variable name(s) and Python syntax in your answer.
Figure 12
capitals = ["Paris", "Berlin", "Rome", "Madrid",
"Lisbon", "Vienna"]
33 exam-style questions on AQA GCSE Computer Science Searching algorithms. Each one has a worked solution and a mark scheme showing where the marks go.