Closed mcfarland03 closed 3 years ago
Hi @mcfarland03
Yes, it's weird that range includes the start index but not the ending one. This omit the end probably has to do with things like mapping to array / list indexes and such:
lst = [2, 4, 5, 6]
range(0, len(lst)) -> [0, 1, 2, 3]
But it's not exactly zero based at the start and always throws me off. If you look at the docs:
It does say this is expected and really your only recourse is to add the +1 at the end as you did. So it can catch us out for sure, but I don't know of a better solution.
I'm a Python noob so I may just be confused, but the latest podcast resulting from expected_final_version is 1 less than the latest podcast resulting from the smelly_podcast. I don't think was intended. You can fix this by adding "+1" at the end of line 19 on the program.py file under expected_final_version. Not sure this is the sexy Python way of fixing it.
Also, when I follow the instructions:
Refactoring to Method doesn't find another usage for duplicate code.
For the instructions:
I end up with a display_results() method with "latest_show_id" and "oldest_show_id" as parameters.