An astronomical database stores information about constellations using their standard three-letter abbreviations (e.g. "AND" for Andromeda, "CYG" for Cygnus, "ORI" for Orion) to quickly query average distance data. There are 88 official constellations.
A program is required to verify if a user-entered three-letter abbreviation is present and lookup its distance from Earth (in million light-years).
Each constellation abbreviation with its distance is stored as a record in a two-dimensional list, constellationTable. The records are sorted in alphabetical order by their constellation abbreviation.
Open file constellation_search.py
Write a program to meet these requirements:
constellationTable.
constellationTable of any length.Use comments, white space and layout to make the program easier to read and understand.
Do not add any additional functionality.
Save your amended code as constellation_search_finished.py
159 exam-style questions on Edexcel GCSE Computer Science Algorithms, covering Constructs for solving problems, Variables, constants and data structures, Arithmetic, relational and logical operators, Tracing algorithm output with trace tables, Types of error and correcting logic errors, Standard algorithms (sorts and searches), and Evaluating algorithm fitness and efficiency. Each one has a worked solution and a mark scheme showing where the marks go.