Console doesn´t work in VS Code even though the interactive window works fine

Hey hey so this might sound weird but when I write code (Python code in VSCode) and run it in the interactive window, everything is fine. The output looks good, the code is correct, everything is great.

However, everytime I run the code via the console (using keyboard shortcuts), I get a plentitude of error messages and it looks like I did everything wrong.

Does anyone have the same issue? Or does anyone know why this might happen?

I´d be grateful for any advice!