1 00:00:00,000 --> 00:00:02,548 Let me demonstrate you something. 2 00:00:02,549 --> 00:00:07,076 I'll create the x variable, store 10 in that 3 00:00:07,077 --> 00:00:11,588 x. y variable, store the text ten in that 4 00:00:11,589 --> 00:00:14,906 variable, and then create two new variables. 5 00:00:14,907 --> 00:00:20,212 sum1 equals to x plus x and 6 00:00:20,213 --> 00:00:25,560 sum2 equals to y plus y. 7 00:00:26,890 --> 00:00:31,450 And then print sum1 and sum2. 8 00:00:31,451 --> 00:00:35,800 Save the script, don't forget, and execute it. 9 00:00:37,130 --> 00:00:38,470 This is the output. 10 00:00:38,471 --> 00:00:45,952 So we got 20 out of x plus x, and 1010 out of y plus y. 11 00:00:45,953 --> 00:00:47,792 What is my point here? 12 00:00:47,793 --> 00:00:51,014 My point is that computers are dumb. 13 00:00:51,015 --> 00:00:53,892 In order for them to understand you, you have 14 00:00:53,893 --> 00:00:57,434 to be very clear, very explicit in what you're 15 00:00:57,435 --> 00:01:01,226 going to say through your language, through Python. 16 00:01:01,227 --> 00:01:04,504 In this case, it's not enough to just say 17 00:01:04,505 --> 00:01:09,048 10, you have to declare what that 10 is. 18 00:01:09,049 --> 00:01:11,400 Is it a number or is it text? 19 00:01:11,401 --> 00:01:14,088 That's why in some languages, in most 20 00:01:14,089 --> 00:01:16,558 of the languages we have type declarations. 21 00:01:16,559 --> 00:01:19,132 So in other languages you would say 22 00:01:19,133 --> 00:01:22,034 something like int, which stands for integer. 23 00:01:22,035 --> 00:01:24,892 So you are saying that this is an integer, 10 is 24 00:01:24,893 --> 00:01:30,990 an integer, and this would be like str y without quotes. 25 00:01:30,991 --> 00:01:33,296 So that tells Python that this is actually 26 00:01:33,297 --> 00:01:35,872 a text and should be treated as so. 27 00:01:35,873 --> 00:01:38,112 So when Python, when you apply a 28 00:01:38,113 --> 00:01:41,972 plus operator, Python will concatenate that text. 29 00:01:41,973 --> 00:01:44,564 So it will add 10 after 10 30 00:01:44,565 --> 00:01:47,650 and it will make this concatenated string. 31 00:01:47,651 --> 00:01:50,154 Now, this is not how it works in Python. 32 00:01:50,155 --> 00:01:53,082 In Python, instead of doing these explicit 33 00:01:53,083 --> 00:01:56,232 declarations, we have implicit declaration instead, which 34 00:01:56,233 --> 00:01:57,928 is this one in here. 35 00:01:57,929 --> 00:02:02,254 So when the number is without quote is an integer. 36 00:02:02,255 --> 00:02:06,642 Well, it can also be a float, but let me talk about that in a few seconds. 37 00:02:06,643 --> 00:02:10,840 And if it's with double quotes, it means it's a text. 38 00:02:11,690 --> 00:02:16,828 If it's z equals to 10.1, for 39 00:02:16,829 --> 00:02:20,614 example, that means it's a float. 40 00:02:20,615 --> 00:02:25,312 And if you don't believe me, you can use the 41 00:02:25,313 --> 00:02:35,156 type function like that x, type(y), and type (z). 42 00:02:35,157 --> 00:02:37,012 The type function will print out 43 00:02:37,013 --> 00:02:39,520 the type of each value. 44 00:02:39,521 --> 00:02:41,500 [Author typing] 45 00:02:41,500 --> 00:02:43,208 So it's a class int, a 46 00:02:43,209 --> 00:02:46,050 class str, which stands for strings. 47 00:02:46,790 --> 00:02:49,438 Everything in quotes is a string 48 00:02:49,439 --> 00:02:52,050 and floats, which stands for float. 49 00:02:52,630 --> 00:02:57,788 With strings, you can also use single quotes like that. 50 00:02:57,789 --> 00:03:01,458 Save it and you're going to get the same output. 51 00:03:01,459 --> 00:03:04,828 So if your intention is to process text, you need 52 00:03:04,829 --> 00:03:09,372 to use quotes if your intention is to process numbers, 53 00:03:09,373 --> 00:03:12,892 so to be able to make mathematical calculations with 54 00:03:12,893 --> 00:03:16,546 them, you need to use them without quotes, 55 00:03:16,547 --> 00:03:18,200 like that or like that. 56 00:03:18,201 --> 00:03:21,800 [Outro music]