Home > Blockchain >  %%writefile app.py not working on vscode. how do i make an app.py file?
%%writefile app.py not working on vscode. how do i make an app.py file?

Time:07-16

My online teacher used %%writefile app.py to create an app.py file and called it a 'magic' command. idk what that is. but when I tried doing what he did on my vscode file, it didn't work. ps, my teacher uses google colab while I use vscode. i just recently started with python and ML, and now I am left absolutely dumbfounded by this and even stuff online when I tried to look it up.

enter image description here

As is shown in your teacher's picture, this is .ipynb file which can be run after install "jupyter" extension on vscode. %%writefile app.py is the syntax in jupyter notebook. You can use it to creat files.

So, install the extension and follow your teacher's example. Vscode can do this.

  • Related