Learning to Program - PYTHON IDE

Asked

Viewed 122 times

-2

I’m learning how to program the Python language and I’m using Vscode I downloaded vscod. When I hit "F5" to run code, it error.

inserir a descrição da imagem aqui

What I need to do, to open a "cmd" that I can type and test the codes?

  • Exemplo em imagemso that the code can run right-click on Workspace and select the option Run python file in terminal

1 answer

0

This error is common, missed to put the line

# coding: utf-8

This should be the first line, you should put it in all the files .py that you create with this editor.

The reason is that your editor uses this encoding to save the files, so you should indicate this to python by placing this information at the beginning of the file.

You can click on the link you have in the error message itself for more information:

https://www.python.org/dev/peps/pep-0263/ 

Browser other questions tagged

You are not signed in. Login or sign up in order to post.