I just installed VS Code and tried to test out a basic python calculator on it which accepts raw input value, however I am unable to write any inputs in the editor as it is displays the message Cannot edit in read-only editor. Is there a way to change this setting or get around it and input values in a different way?

Here is the calculator:

degC = input("What is the temp in Celsius?")

degF = int(degC) * 9/5 + 32

print (str(degC) + " degrees Celsius = " + str(degF) + " degrees Fahrenheit")

I expect to be able to enter a value when prompted to do so in the editor, but am unable to do so.

1 Answers

Joris van Ede On Best Solutions

You could call your script from a terminal, like

python yourScript.py


C:\Python27\python.exe C:..\yourScript.py

Have a look here: How to Run a Python Script via a File or the Shell