Hi. I’ve been practicing the end of unit problems for preparation towards the final exam, and having attempted unit 5 assessment the 2nd time I felt I came across a variable shadowing problem in the last question. A local variable was declared twice in the same scope, and my understanding is that the program won’t compile for that reason.
Please correct me if I’m wrong because I’d like to get a good grasp on scoping. Thank you.