Welcome to the forums.
Your issue is one of scope. You are attempting to access variables that have been declared inside of a function from outside of the function:
For reference, here is a link to the exercise.
Dang it! It’s just like walking up and down the aisle for 20 minutes at the grocery store looking for a specific bag of candy your kid wanted and giving up then asking someone and they go right to it right in front of you.
I did try for quite some time to do it on my own. Thank you so much for stating the obvious!
This ought to be on a t-shirt, it’s the definition of coding