I’m doing cs50p and I am using visual studio.
In the first tutorial they are using command "code hello.py" in terminal and it should create a file but I’m getting only errors, saying the powershell doesn’t understand comand "code"
code : The term 'code' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the heck the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ code hello.py
+ ~~~~
+ CategoryInfo : ObjectNotFound: (code:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
2
Answers
just type "touch hello.py" in your terminal.
The "code" command opens Visual Studio code, I am assuming that you have it installed. Once you install it correctly you may open it and save the file. If your intention is to only create a black file without opening it use the "touch" command (a.g touch file.py).