USING PYTHON.
Write a program that uses a dictionary to perform simple contact tracing . The key is the patient number and the values is a list of patient numbers who are close contacts of this patient.
The program inputs the patient number and list of contacts for exactly 3 patients. Each patient has exactly 2 contacts. This data is then stored in a dictionary with the patient numbers as keys, and the list of contacts as values. The last input is the patient number to query, and the program prints the list of close contacts. It then also prints the list of close contacts of those in close contact to the patient queried. If there is no patient record for a contact, the program prints'No Data'.
See sample input and output
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here