Running our code in VSCode

We're not quite ready to learn how to code yet. First, let's fill our hello.py file with the text print("Hello world") and save. We can run this code from the VSCode menu (up the top) using Run → Run Without Debugging, or Ctrl+F5

<aside> ❗ If Ctrl+F5 doesn't work, keep in mind that on many laptops, the keys double up as media keys - Volume Down on our laptops. Try activating the Fn key so that it lights up and then typing Ctrl+F5.

</aside>

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9a357410-5eaf-48ec-9326-9c78c956d35e/Untitled.png

We have text! There's some complicated blue stuff which we can - and should - just ignore, but what's most important is that our code ran. In our case, we typed in code which outputs "Hello world" to the console (to the window of text where we ran our code).

This opens up a shell in VSCode for us and types in a command to execute the Python code. However, we can do this ourselves too. Programmers use the shell a lot, so for this course let's open a shell ourselves and run the code ourselves. But before that - let's learn some stuff about this shell!

<aside> ⚠️ The following information is for the Windows Command Prompt shell. Things will be different for PowerShell, or Bash/Zsh/Fish which are the shells used in *nix systems like Linux and macOS.

</aside>

History of the Shell

Back in the time of the dinosaurs when your parents were born, modern computers didn't exist. We had things like the Apple II and MS-DOS, but you'll notice something different about them:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/195002ee-ae23-4cad-85f2-155a7695b92e/Untitled.png

There's no mouse! And if you've ever tried to use your computer without a mouse or a trackpad... well, that's pretty hard to do on a modern computer. Before the invention of the mouse, we could only type. As a result, literally everything we did had to be done, typed on a keyboard. This led to the idea of a command.