Python Hello World | Real Estate Analytics
In this video, we will run your first python script, you will learn how to work in Google collab notebooks, how to write code and how to run code. This will build a foundation for you to become a Python programmer.
Ariel Herrera 0:00
In this video, we will run your first python script, you will learn how to work in Google collab notebooks, how to write code and how to run code. This will build a foundation for you to become a Python programmer. First step is to open up Google Drive. From the previous video, you should already have the folder for the course copy to your drive. There are two folders. Notebooks is where we will code together and each lesson answer key is the result of each lesson. This will be useful for you to refer to later on. If you are watching on YouTube, you can access the notebook Folder link located in the show notes, you will need to either download or clone the notebook into your own drive. Next, click into the notebooks folder. Here you will find a table of contents listed first, click into the notebook, the contents will be your guiding source. Each section is broken down to different notebooks. Here you can see it towards the bottom. Now let's select the Hello World notebook. This is the first notebook we're going to work in for this course. Let's explore Google collab a little bit further. Google collab is a Jupyter Notebook, but it's all on the cloud. This means we do not have to have Python installed on our machines, which is usually a large barrier for most people learning Python. In Google collab, we can share notebooks with others to work collaboratively. On the top left we have a bar which we will navigate through in the following sections. And each section you will see at the top there is a text box. This is written in Markdown. I have here the title who created the notebook. History if any changes are made, how to copy their notebook, and then useful resources useful resources you will find each and every time which will have links that you can further explore if you want to get even deeper into a topic. In a little bit more detail. Collab or a collaboratory allows you to write and execute Python in your browser with zero configuration required access to GPUs free of charge, and easy sharing. Whether you're a student, a data scientist, or an AI researcher, collab can make your work a lot easier. Now getting started. The document you are reading is not a static webpage. It's actually interactive. So we can write and execute code. See here, for example, this is a code cell with a short python script we can write and store values. So let's actually write our first variable. We're going to call this my first string. And our variable just holds our object, we're going to call this string Hello World. Now we have a string or in this case, a sentence, it has a variable associated called My first string. And we can run this code by either clicking Ctrl Enter, or this play button on the left hand side, we are now executing our code, and it has completed with a green checkmark. If we want to view the contents of our variable, we can write out the variable below. We can see here that Google collab already recognizes our variables that we've created. Now we can click play. And when we click play, we get our value, which was Hello, world. Now the great thing about strings is that we can actually merge some of these together. So what I want you to do in the next cell is to create a new variable that's going to hold your name. Here, I'm going to put my name area. Now I want to make a sentence that says, Hello World, my name is Ariel. And all we have to do is actually called both of our variables and add a plus in between. Let me show you how. First I'm going to type the first variable which was my first string. Then I'm going to have a plus button to add more to this string. Now in double quotes I am going to put my name is and then I'm going to add the variable i just created called name.
Now we can run this cell, and our output is hello world. My name is area and the way we did that was we assigned two different variables, my first string hello, world name erielle. And then we had our string right here, and we executed our first Python code with multiple variables. Now let's open up a new cell and let's put in our goal. So create a variable of what your goal is, for me When I first started in the real estate space, my goal was to become a real estate investor. So I'm going to type that out here. Next, I'm going to run Shift Enter, in order to run the cell, I'm going to create a long string that's going to say, Hello World. My name is Ariel, I want to become a real estate investor. Just note this, as I'm doing it, we're going to dive deeper into strings later on. But I just want you to get an overview of the power of Python, I'm going to create our first print statement and now create the string.
I have a string now that has 012 for different areas where I could plug in my variables. My variables are my first string, my name and my goal. Now let's run this cell. And our output is hello world. My name is Ariel, and I want to become a real estate investor. Hopefully you put in your goal as well typed out the same code. And now you could see the power of Python and how easy it is to get set up with Google collab. And the next section, we're going to dive into different data types, lists, data frames, visualizations, all the tools you need to really get your foundation of being a Python programmer. See you in the next section. want full access the introduction to real estate Data Analytics course. Then sign up for the course in the link below. You will learn Python programming all with real estate related examples. This includes web scraping, retrieving data from sources like Zillow, realtor, Redfin, Yahoo Finance, US census, and more. If you haven't already, check out the introduction video to the course on YouTube to get a full understanding of what the course has to offer. Also a members of the free tech and real estate group on Facebook receive a 20% off the course seeing the next lesson.
Transcribed by https://otter.ai