"...do you have any suggestions how to know better in the future?"
my usual work out goes like this
1) planning out what you want
2) write a pseudo code (optional)
3) do a small bit at a time
4) run the code to see if you getting what you wanted.
5) repeat 3 and 4 until finish.
"My knowledge in Python is still very limited obviously and I hope to be able to solve such problems in more than one way in the future."
you will! I believe in you!
Part 2... It's a Sunday afternoon when Ted secret identity was found out... (suspenseful music!)
Look at the code you did in part 1. Should be exactly like that but instead of check the pollution level you should add pollution and counting the number of time a city appears.
my usual work out goes like this
1) planning out what you want
2) write a pseudo code (optional)
3) do a small bit at a time
4) run the code to see if you getting what you wanted.
5) repeat 3 and 4 until finish.
"My knowledge in Python is still very limited obviously and I hope to be able to solve such problems in more than one way in the future."
you will! I believe in you!
Part 2... It's a Sunday afternoon when Ted secret identity was found out... (suspenseful music!)
Look at the code you did in part 1. Should be exactly like that but instead of check the pollution level you should add pollution and counting the number of time a city appears.
When my code doesn't work I don't know why **think** and when my code works I don't know why **think**