Remove the semicolon from the end of your "for" declaration. The loop does nothing more than add 5 to course. Once that's done, the bracketed code executes -- only once, with course = 6. Just remove the semicolon and everything will function as you intended.
And I believe that, because this code is bracketed, any changes made to the variables will only last until the closing bracket, because of how the scoping works.
No. This is absolutely NOT true.
If you declare a variable within a scope, then it will be destroyed once it falls out of scope. And it will hide any variable of the same name that was declared outside that scope - which is a dangerous and confusing thing to do, so don't do it.
But if you change the value of a variable that was declared outside the current scope, then that value change won't magically be reversed just because you exit that scope.