1 00:00:01,380 --> 00:00:10,050 Strings and numbers let's kick it off by talking about tweens so streams are simply sequences of characters 2 00:00:10,410 --> 00:00:12,410 and they are widely used in programming. 3 00:00:12,420 --> 00:00:16,990 You want to download a bunch of files from an FTB site using a Python script. 4 00:00:17,250 --> 00:00:21,820 Well you'd have to use a string to take a bite from the League of Their B side. 5 00:00:21,870 --> 00:00:24,160 Would you want to create a table in Python. 6 00:00:24,420 --> 00:00:29,830 Again you use a screen name or columns or your old strings. 7 00:00:30,030 --> 00:00:33,800 Well of course they can be storing variables just like this. 8 00:00:33,840 --> 00:00:37,630 I'm going to sort through you Springstein three different variables here. 9 00:00:38,250 --> 00:00:50,080 Let's say a variable filename equals whether 19 0 1 very well thought top a table equals temperature 10 00:00:50,440 --> 00:00:53,660 variable year equals 19 No. 11 00:00:53,660 --> 00:00:54,800 1. 12 00:00:55,360 --> 00:00:59,840 Strings are always in close with quotes as you concede. 13 00:00:59,950 --> 00:01:04,400 In this case I use double quotes about seeing of quotes can be used as well. 14 00:01:04,430 --> 00:01:11,730 Notice the last variable year 19:1 it may be a number in our perception but Python recognizes it as 15 00:01:11,730 --> 00:01:12,710 a string. 16 00:01:13,110 --> 00:01:16,980 The reason for that is that you are declaring it in quotes. 17 00:01:16,980 --> 00:01:22,590 This means you cannot perform mathematical operations on that quoted number. 18 00:01:22,590 --> 00:01:26,810 Pipeful knows you are declaring the numbers when you write them without quotes. 19 00:01:26,820 --> 00:01:32,850 So if you want to declare a number you go straight away without using quotes. 20 00:01:32,850 --> 00:01:45,570 Let's say a real year equals 19 or 1 and look at this and that gives an error because Python is trying 21 00:01:45,570 --> 00:01:47,990 to add up a string with a number. 22 00:01:48,270 --> 00:01:56,810 You said if you try to add up the other variable we just created you get what you expected. 23 00:01:57,670 --> 00:02:00,740 That's the sum of the number 19:1 with one. 24 00:02:01,170 --> 00:02:03,350 Well you could also add upstream if you want. 25 00:02:03,630 --> 00:02:06,400 You can do that using the and operator. 26 00:02:06,450 --> 00:02:19,190 For example let's say file name belongs on a scale which is a string table and we have a string. 27 00:02:19,280 --> 00:02:24,820 Now when you use the plus sign for strings we call the process concatenation. 28 00:02:24,830 --> 00:02:26,080 Ignore what I said earlier. 29 00:02:26,080 --> 00:02:29,440 How about adding up strings I like. 30 00:02:29,960 --> 00:02:32,620 Yeah so we concatenate strings. 31 00:02:32,930 --> 00:02:39,530 And here we concatenated three strings a string contained in the variable filename on their scores string 32 00:02:39,630 --> 00:02:44,050 and the string contained in the table variable as well. 33 00:02:44,060 --> 00:02:46,360 The result was a single string. 34 00:02:46,490 --> 00:02:49,610 Now strings are just a bunch of characters. 35 00:02:49,730 --> 00:02:56,390 There are no subtypes of strings numbers however can be of different types to other types to be mentioned 36 00:02:56,400 --> 00:03:03,560 here are integers and floats integers are like all numbers but they include negative numbers as well. 37 00:03:03,560 --> 00:03:11,960 The normal soling the variable potato price we created earlier is an example of an integer and a few 38 00:03:11,960 --> 00:03:16,390 words about floats floats or decimal numbers. 39 00:03:16,950 --> 00:03:27,960 A man here holds a float number and so does the potato version and you are very blind just screaming. 40 00:03:28,210 --> 00:03:29,600 You're going to of course chicken. 41 00:03:29,920 --> 00:03:31,070 If you don't believe me. 42 00:03:31,090 --> 00:03:34,200 You can check the type of your variable values 43 00:03:37,190 --> 00:03:38,780 yes. 44 00:03:39,260 --> 00:03:46,070 In most other cases you'll be using floats for your values but you could also have to use integers for 45 00:03:46,070 --> 00:03:49,730 certain data such as number of people for example. 46 00:03:49,760 --> 00:03:55,480 It doesn't make sense to have free will in one persons so you have to use only bija. 47 00:03:55,520 --> 00:04:01,310 You could also run into a certain scenario where you really have to use anything you say you want to 48 00:04:01,600 --> 00:04:03,110 multiply string. 49 00:04:03,430 --> 00:04:07,210 And to do that you'd use the multiplication operator. 50 00:04:07,910 --> 00:04:11,840 Let's say the string byte times two. 51 00:04:11,990 --> 00:04:13,480 Bye bye and Jeff. 52 00:04:13,520 --> 00:04:14,720 See here in the next lecture.