If like me, you are having problems with running the code give in the lesson. (I also didn’t realize at first, that you had to type in “python” to switch over to it.)
I found a solution that works, using the Anaconda command prompt, or powershell prompt.
The instructions say to use port number 5432, but my PostgreSQL 13, installed with port 5433, and wouldn’t allow me to change it to 5432. After much trial and error, I discovered that the port number can be specified in the code, plus adding in the password.
After making those simple changes, it works fine.