Use Python to program a hash with a couple of people and their interconnected birth years. Next, show the people's names and their birth years, and have the user enter one. Reverse the hash and show the birth years, having the user choose a birth year. Then, show the person's name for that birth year. Also, the user should have the option to add and delete entries.
Use Python to
Hashing is a cornerstone technique in computer science, pivotal in a myriad of applications ranging from databases to data retrieval methods. In the scenario presented, we harness the power of Python dictionaries (essentially a form of hash tables) to catalog and manage a collection of individuals and their associated birth years. The crafted program offers a suite of functionalities, including data visualization, name-based or year-based queries, and the capability to augment or expunge entries.
Step by step
Solved in 3 steps with 2 images