I’ve edited your post 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.
I mean, print out the results of the challenges you fail and look where the difference to the expected result is.
If you pass some and fail others, sounds like your loop is not running the correct number of times.
Also one nice feature of Python is that you can make multiple assignments in one line.
For example, switching the value of two numbers is: