Python for Absolute Beginners Transcripts
Chapter: Writing your first lines of code
Lecture: Running the Python REPL on Windows

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Let's do our little hello world example. In the command prompt in Windows I've already pinned this to my taskbar here so here's our command prompt.
0:10 But if you don't have it, of course you can just come over and type cmd and pick command prompt and then probably pin it on here.
0:16 So we're going to go over here and just like before we want to type Python. However, this time when we type Python in Windows
0:23 this, probably not certainly, probably means the latest one depending on how you installed it. You installed it from the Windows Store
0:30 you can also type Python3 and be sure to get the right one. But there's many other ways to install it so you want to run probably Python.
0:37 Now here we have 381, that's pretty cool. This means we're using one of the later versions and it looks like, most importantly, it's 3.6 or above.
0:46 If for some reason, you can exit out like this if for some reason now it said Python 2 you can type which Python or you can type over here Python
0:57 which works in the other systems and it will show you all the places that it finds Python.exe. First it found it in 3.8, and then it found it in 3.7.
1:04 Then it found it in the Windows Store version that we've installed. Though, when you type Python it's going to run the very first one that it finds.
1:12 So in order to fix this in Windows if you have the wrong one, you have to make sure that you just set the path so that the highest version
1:18 of Python, the one that you want to run, is first. That's great. Now we come over here and type Python and we have Python 3.8, that's great
1:24 And we can do our print hello world. Tada! Everything works great. Now another way to exit from this app here is we can type control z and hit enter
1:35 and that just exit out. That's the sort of a short-hand for typing this. On macOS and Linux, you type control D. On a Windows, control Z.
1:43 For whatever reason, those are different. Doesn't really matter. Whichever one you're using, you'll just get used to it to get out of there.
1:48 There we have hello world on Python on Windows.

Talk Python's Mastodon Michael Kennedy's Mastodon