The code provided in the course has some issue

Having the exact same issue as well, any solutions?