You may have heard others say that data is really important for computer programming and for AI. But what is data? Let's take a look. Here are a few examples of data you might encounter in your day-to-day life. If you were to search online for a map of the population density of your country. That's data showing where people are living in a given region. Or, if you were to look at weekly weather conditions in the city, the numbers showing the daily temperature would be data. Or if you look up stock prices, highs and lows, those numbers are also data. Python or computer programs can process certain types of data. One type of data is text data. So "A" is a piece of text. The word "egg" is a piece of text. "My favorite TV is hiking" is a piece of text. And Python can print out text. And as you'll see later also do other things with text. Programming languages can also process and manipulate numbers like pi 3.14 or other numbers. Other types of data you may have heard of computers processing include tabular data like spreadsheets or pictures are also another form of data as well as audio. Almost all data in computers turns into either text or numbers. It turns out that an image is made out of pixels. And the way a computer stores an image is by storing a lot of numbers showing maybe how much each pixel exhibits red, green, or blue. The three primary colors and sound too, is stored as a lot of numbers in a computer. It turns out sound is made out of very rapid variations in air pressure, and it's by storing these different measurements of air pressure as a bunch of numbers, that's how a computer stores sound. So the two most important types of data we process are text and numbers. Let's start with text. Hello World, is an example of a snippet of text that's called a string in Python. And the word string comes from thinking of "hello world" as a string of letters. To specify a string in Python, here are the key components. There are double quotation marks that we use to mark the start and the end of the string, and then the text is between these quotation marks. Technically, strings in Python are any combination of text, number or symbol characters enclosed in double quotation marks. In this string, everything between the quotation marks is part of the string, including the space. So, here are some examples of strings you could store in Python. "Hello world" or "my favorite drink is Earl Grey Tea", or a funny character like that. Or here's "2.99" stored as a string and I'll share in a second what's the difference between 2.99 stored as a string versus stored as a number. So, feel free also to go to the Jupyter notebook and run the code snippets to print out these three different strings. Now, it turns out that there's another way to store strings in Python. If you use triple quotation marks, then you can store a multi-line string, meaning a string with enter in it. And so here is an example of a multi-line string. I'm using triple quotes I can insert and enter here. And if I run this, you see that all these spaces are actually part of that multi-line string. So if you don't want all these spaces, you have to run it like this. And feel free to edit the code and play with this. In contrast, if you were to try to write this with a single quote, this will generate an error message. Let me show you that right now because there's an enter here. So Python thinks of this as two lines of code. The first line of code it thinks is print "Hello world" without a close quote and close parentheses. And so it tries to run this first line and so there's an error. Whereas in contrast if you use triple quotes then Python knows you're trying to write a multi-line string and this does not generate an error. Now it turns out that Python lets you check what type a particular piece of data is. You've seen this code print. "Hello world" Print is a function or a command you can tell Python to execute. I want to show you a different function, which is the type function. And if you were to tell Python type "Hello world", then your output STR which tells you that this is a string. So here's type "Andrew" and then hit shift enter. It outputs string str because this "Andrew" here is a string. If you were to do this with a multi-line string this is also a string. This is the exact same type as the string "Andrew" is just that the string has a different piece of text in it. Now, if I were to tell it what's the type of "2.99" in quotation marks, this is a string. Now, let me do something different. I'm going to say type of "100". It turns out the type of 100. This is a number. And in particular is a type of number called an integer, meaning it's a number without the decimal point. In contrast, if we were to do type of 2.99 then this is a float. And a float is another way that Python stores or represents numbers, but numbers with a decimal point. So, Python has two primary ways to store represent numbers, which are integers and floats. Integers represent numbers with no decimal part like 42, 100, 9, 0. And floats have digits after the decimal place. Numbers say 3.14, 2.9, -0.003, and so on are floats. So please feel free to pause the video and plug in your own different numbers and run, print or type on them and see what results you get. One of the ways I often use Python is as a calculator. If you want to do addition like "what's 2 plus 6?" You can actually write a Python command to say print two plus six, or print 57 -40 or multiplication or division. The reason I do this in Python is because if I'm trying to add a lot of numbers and I make a mistake, I can actually go back and edit one of the numbers and have Python redo that calculation. So, for example, if I run a business selling, say, lemonade and I want to total up the sales over the last 12 months, I might type something like this and have it print out the sum. But I find that I actually made a typo. I can actually go back and say, oh yes. Back in March we didn't sell 43 units. We actually sold 45 units and just edit it and get an updated answer like that. So I actually find using Python more convenient than using my personal handheld calculator. You can go back and edit these calculations. So far we've done just arithmetic. It turns out that if you have other things you want to do, say you have money in the bank account earning 5% interest rate, and you want to know how much you have after ten years, you need to compute 1.05 to the power of ten. But if you're not sure how to do that, you can go to the chatbot to ask it how to compute 1.05 to power of ten. And if you do that, it shows this answer that is the double-star operator 1.05 to power of ten it outputs, you know, 1.62. So, for every dollar you have, you end up with $1.62 after ten years. Lastly, when manipulating numbers in Python, one thing to be aware of is the order of operations. If you are converting temperature from Celsius to Fahrenheit, then you have to first subtract 32 from the temperature in Fahrenheit and then multiply by five over nine. So, if it's 75°F and you want to convert it to Celsius, if you were to write this code, then Python will do this first. It'll first take 32. Multiply by five over nine. And this will result in an incorrect answer. And so using brackets or parentheses like this tells Python in what order you wanted to carry out these operations. And the order of operations is the same as in normal math where you multiply and divide before you do addition and subtraction. And that's why in code this generates an incorrect conversion from degrees Fahrenheit to Celsius, whereas this generates the correct conversion. Whereas 75°F is 23.889°C. And so that's it. You've now seen datatypes in Python, as well as how to use Python as a calculator. And this by itself is actually a very powerful tool. Before you go on to the next video, I encourage you to try out the exercises at the end of the notebook to practice what you've learned. And always remember that you can ask the chatbot at any point for help. When you're learning to code, building the habit of asking the chatbot is a very useful one. In the next video, we'll learn about a key technique for printing things in Python called F strings. And this will allow you to print out both strings and numbers together. So, please try the exercises and I will then see you in the next video.