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.
0:02 In the command prompt in Windows
0:05 I've already pinned this to my taskbar here
0:07 so here's our command prompt.
0:09 But if you don't have it, of course
0:10 you can just come over and type cmd
0:12 and pick command prompt and then probably pin it on here.
0:15 So we're going to go over here and just like before
0:18 we want to type python.
0:19 However, this time when we type python in Windows
0:22 this, probably not certainly, probably means
0:25 the latest one depending on how you installed it.
0:27 You installed it from the Windows Store
0:29 you can also type python3 and be sure
0:31 to get the right one.
0:32 But there's many other ways to install it
0:34 so you want to run probably python.
0:36 Now here we have 381, that's pretty cool.
0:39 This means we're using one of the later versions
0:41 and it looks like, most importantly, it's 3.6 or above.
0:45 If for some reason, you can exit out like this
0:47 if for some reason now it said Python 2
0:50 you can type which python
0:53 or you can type over here python
0:56 which works in the other systems
0:57 and it will show you all the places
0:59 that it finds python.exe.
1:00 First it found it in 3.8, and then it found it in 3.7.
1:03 Then it found it in the Windows Store version
1:05 that we've installed.
1:06 Though, when you type python it's going to run
1:09 the very first one that it finds.
1:11 So in order to fix this in Windows
1:12 if you have the wrong one, you have to make sure
1:14 that you just set the path so that the highest version
1:17 of Python, the one that you want to run, is first.
1:19 That's great.
1:20 Now we come over here and type python
1:21 and we have Python 3.8, that's great
1:23 And we can do our print hello world.
1:27 Tada!
1:28 Everything works great.
1:29 Now another way to exit from this app here
1:32 is we can type control z and hit enter
1:34 and that just exit out.
1:35 That's the sort of a short-hand for typing this.
1:37 On Mac OS and Linux, you type control D.
1:41 On a Windows, control Z.
1:42 For whatever reason, those are different.
1:44 Doesn't really matter.
1:45 Whichever one you're using, you'll just get used
1:46 to it to get out of there.
1:47 There we have hello world on Python on Windows.