Doubts about VsCode [closed]

-1

I'm doing an exercise whose code is as follows:

import random
n1 = str(input ('Primeiro aluno:'))
n2 = str(input ('Segundo aluno:'))
n3 = str(input ('Terceiro aluno:'))
n4 = str(input ('Quarto aluno:'))
lista = [n1,n2,n3,n4]
escolhido = random.choice(Lista)
print('O aluno escolhido foi: {}'.format(escolhido))

In pycharm it runs normally but in vs code it gives the following error:

  

File "challenge019.py", line 2, in

     

n1 = str (input ('First student:')) File "", line 1, in NameError: name 'oi' is not defined

    
asked by anonymous 19.02.2018 / 05:02

1 answer

0

Mark Wesley, the error you reported is not about the code described above. The error would be another, since line seven should start with the smallest. After correcting this, in the case of your code, as it requires a prompt to answer the "input" questions, you should run the debug using python with integrated terminal, this way vscode opens a screen for access to the terminal, where you will answer the questions by getting the expected result.

    
19.02.2018 / 13:43