VS Code and the Chaos Program


Hello, everybody. Bruce here. And I thought I’d just give
you a short little video on this particular page here
that’s in Canvas that you’re reading now on how to download
and install this Chaos program and open it up in
Visual Studio Code. The video that’s in the page
is using something called IDLE. It’s a primitive editor
that comes with Python when you install it. In fact, we used to
use it for a long time prior to switching over
to Visual Studio Code. So check this out. Ready? So I’m in the middle of
the page on Download, and I’m going to click on
the file called chaos.py. And it’s going to try to
give you a preview of it here in the browser,
but I’m going to click on Download chaos.py. And now it’s going
to download it here into my download folder. In fact, if I go
Show in Folder, you can see here it’s on my
downloads on my C drive on my PC. In fact, I’m just going to
move it to my desktop, OK, and there it is on my
desktop, all right? So what I’m going to do now
is I’m in Visual Studio Code. And if you don’t have
the sidebar open here, you can just click on this icon. You can also hit
Control B, or Command B if you’re on a Macintosh. And I’m not going to open
a folder, because I don’t have this file in a folder. But if I go File, Open File,
you’ll see on my desktop here, I’m on my desktop, Chaos,
and I’ll click on Open. And now you can see
I have the file here in Visual Studio Code. Don’t mind that right there. And I can drag this
like a sidebar here, or I can close it myself using
Control B on a PC and Command B on a Macintosh, OK? See, it’s close there, right? So in the video below
this one, where I actually go through the program,
you see that I’m using IDLE, OK, and not
this editor right here. So I could do
this, right, debug. Start with that debugging
right here in the menus, and it’ll run the program
in the terminal below. And it says Enter a
number between 0 and 1, I’ll enter 0.4, and you can see
there that the program did run, all right? So I just wanted to get you
familiar with that workflow file. Either open a folder that
contains one or more programs, or open a file. I highly recommend that
you create folders and not do what I just did. So I would have probably placed
that in a module-1 folder. So I had the code there. So there you go. All right? I hope this little video helped.

Leave a Reply

Your email address will not be published. Required fields are marked *