I have issues with the medical data visualizer. After running my code, 3 out of 4 tests were passed. The last one is about differing values. Here’s the error:
self.assertEqual(actual, expected, “Expected different values in heat map.”)
AssertionError: Lists differ:
How do I solve this? I have attached a link to my code:
I can’t access the link, but it seems that the error indicates a discrepancy between the expected output and the output you’re getting. Try adding print statements in your code to help with debugging and see the actual output. Sometimes, the data types of the values can differ, which may cause issues. If you can update the link or paste your code here, I’d be happy to take a look!
I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
Thank you so much for helping to make the code readable. The code works now and passes all tests. The line I missed was part of the tasks, but not in the step-by-step instructions. I did try going through previous questions but didn’t notice that.