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

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Well, let's get our REPL running here on MacOS.
0:03 Again, if you're on Windows
0:04 hold tight for just a moment
0:06 and we'll get over there as well.
0:07 Now, I have to have pinned a terminal in my dock.
0:11 If you don't happen to have it pinned
0:13 you can come over to your applications
0:16 go to utilities.
0:18 Down here somewhere there's terminal.
0:19 And you can run that from there.
0:21 We're going to run it like so.
0:23 Now what's the most natural thing to do
0:25 to get your Python REPL running?
0:27 Well, it's probably to type Python.
0:30 That sort of works. This looks like what we saw before
0:32 except for notice this is not good.
0:35 It's Python 2.
0:36 Now Python 2 is no longer supported.
0:38 There's Python 3
0:40 is the current version.
0:41 So definitely not something we want to run.
0:43 It just turns out that MacOS happens to have an old version
0:47 of Python that has been shipping with it forever.
0:50 And because that's already there
0:51 it's name is Python
0:52 so we have to refer to it on MacOS
0:54 and in Linux in a different way, we say python3.
0:57 Remember, long as this is 3.6 and above.
1:00 So 3.6.whatever.
1:03 Ignore that six.
1:04 That's just not what we're talking about.
1:05 3.6 or higher you're going to be golden.
1:08 The latest version is 3.8.
1:09 But on this account I don't happen
1:11 to have that set up that way.
1:13 Here we are in our Python REPL.
1:15 We should be able to do things like we saw on the screen
1:17 Print, "Hello World!", make sure you put that in quotes.
1:20 And close in privacies.
1:23 Ta-da! It's working!
1:24 "Hello World!" is often this little example shown
1:26 say what is the least amount of code that I can write
1:30 to get "Hello World!" on the screen
1:32 in many programming languages?
1:33 Python it's incredibly simple, as you see.
1:35 Other languages it's actually a bunch of steps.
1:38 The real meaning and value behind "Hello World!"
1:40 is to show you what is the smallest step
1:43 you can do to get that on the screen.
1:45 It's to make sure that you can run the code
1:47 in other languages, compile it
1:49 and make sure that your system is set up to work.
1:51 So if you can get Python to run
1:53 and you can type this.
1:54 And you get this to come out, everything's good.
1:56 You have the right version of Python
1:58 and you're ready to go.
1:59 We'll start writing code in here in just a second.
2:01 But, remember, make sure that's 3.6 or higher.