I am learning port scanning through a Udemy course.
Afer finding the open port 445 using Nmap:

The video from the course asked us to change the port in the code we created accordingly

And after saving the change, we should execute it with
./[NAME]
In the video, it shows "Port is open". But when I do it, I get "Port is closed" even though Nmap shows it is open:

Am I doing anything wrong?
PS: I keep getting the syntax error even though the code I created is identical to the one in the video.
replace the line with the print statement with:
print(f"port: {port} is closed")