Python for Absolute Beginners Transcripts
Chapter: Writing your first lines of code
Lecture: Writing code intro

Login or purchase this course to watch this video and the rest of the course contents.
0:00 The stage has been set and it is finally time to write some code. We've talked getting Python set up
0:08 so we can run code that we'd write on your machine. We've talked about some of the big ideas behind programming force code
0:15 what it means to execute source code algorithms and even, to a smaller degree, data structures. So it's time to start writing code in Python.
0:25 Here's a little bit of Python code and we're going to write it in this little environment here. What we're going to do, is we're going to start
0:31 from the absolute simplest way that we can explore a few basic ideas in Python before we get into full-blown
0:38 programs, and editors, and things like that. We're going to use this thing called a REPL R-E-P-L it stands for, Read. Evaluate. Print. Loop.
0:49 What you do is you type some Python expression in here it either gives you an answer or if there is no output that doesn't do anything
0:56 and it just evaluates it it comes back and it loops around and it asks you again What do you want to do now? What do you want to do now?
1:03 Real programs are not written this way. However, it's the simplest thing that we can do to get started. In this first chapter
1:10 we're going to work in this Python REPL. Afterwards, we're going to put it away because they are a lot of disadvantages here. For example
1:18 code that we type in here doesn't get saved. If we make a mistake it's quite hard to edit what we've created in here
1:24 and as long as we're doing complicated things anyway. So real programmers they don't work here to create programs
1:30 but they do work here to explore little ideas and that seems like a great place for us to start. This is how it looks if you're on macOS.
1:38 Looks really similar if you're on Linux as well. If you're on Windows, it looks a little bit different it's going to look like this.
1:44 We're going to go through and do a little bit of setup both on macOs and on Windows though either of those, you should be all set. So don't worry
1:52 we're using one and you're on the other we're going to talk about, real quickly how to get everything up and going
1:57 get this REPL running the right version the right way and so on and then we're going to explore two core ideas in programming
2:04 variables and reference types that's idea 1 the other one is data types themselves like numbers vs. text vs. dates that kind of stuff.
2:14 We're going to explore those and work with them in this Python REPL to get our feet wet and get started writing Python code.


Talk Python's Mastodon Michael Kennedy's Mastodon