PHY667 - Basic PYTHON - Task 00 - Running PYTHON On SPYDER

This video in the series. Now it is about how to run the program that you have written in Spider. Ok. So, firstly, here is your editor window. And here is your iPad and console.

So normally you can run any commands in the console, and the console will be outputting your answer. So like this. Okay, so if you assign some variables and in the console, the console will remember the information about your variables, okay, but another way that to run the programs. And spider is to use the editor window.

Okay, So from the editor window, you can click at the new file to start with. And then if I go to the desktop and I create a new folder, I just call this P. - 1 6, 6 7, ok, and then I'm going to save the source code in the editor I'm going to save this as I would say this is the task 0. Yeah, ok. And then we begin with a very classic program there.

The classic for this classic program is hello. Oh, yeah. So Alice, if you can, if you can make this hello stuff to work, yeah, that means you poke. That means your. Compiler is working, so I have just print hello, and we do save and the way to run the program.

Yeah, the first way we can push f5, or we can push this button to run your program. And then the result of your program will be shown in your console. Yeah. So here you say, print, hello.

And your console is printing the word hello to you another way to run your program, is you? You can run your source code on the left-hand side window by the console on your right hand side window? Okay, so. In in the console here, which is called the IPython console. Okay, so if you don't have this console available on here, you can go to the menu and click on the open, an iPad on console to open this console using okay.

So in this console, you can use some unlike command, for example, if I type CD and push enter, yeah, it is showing your current folder, which is your home folder. Okay. So then if you type CD desktop and then enter this, you go to your desktop. So, and then if you type LS and then.

Enter it will show all your files in the desktop. Okay. So the folder that we have just built is called PHY, six, six seven, which is the code name of this subject. So, and then it is, it is also where we have saved this task 0 the by. So if you want to run this program, tasks, scrota, p1, you want to run this source code. You need to access into this PHY 667 folder, using the command CD.

So here I will type, CD, pay 667 and an Intel. So now the console will show that now you are in your home folder. Then within. Your home folder you are in the desktop and within desktop you are in the folder, PHY 667. So if you type the LS again, here you are you're going to be shown the file called has 0 the by.

So to run this program from the console, you can simply type run and then followed by your source code, and then push enter, and the program will run. And the program will print the result of the program.