1 00:00:00,360 --> 00:00:00,970 Welcome back. 2 00:00:01,380 --> 00:00:07,650 This is a quick optional video that, well, with something that you probably won't use, but I want 3 00:00:07,650 --> 00:00:13,740 you to just know that it's out there and that is there's actually an extra data type that I didn't talk 4 00:00:13,740 --> 00:00:15,840 about, and it's called complex. 5 00:00:16,140 --> 00:00:20,160 And as the name suggests, it's pretty complex. 6 00:00:20,880 --> 00:00:31,830 However, a complex number, again, is a number that is a third type instead of int and float. 7 00:00:32,100 --> 00:00:34,620 We also have this type four numbers. 8 00:00:34,770 --> 00:00:40,680 Now, the reason I'm not really teaching complex is that you only use this if you're doing something 9 00:00:40,680 --> 00:00:42,780 really, really complex math. 10 00:00:42,960 --> 00:00:45,060 Most of the time you'll never use it. 11 00:00:45,070 --> 00:00:50,100 I personally have never used it, but it is good to know that it exists. 12 00:00:50,640 --> 00:00:52,770 It's the equivalent to a real number. 13 00:00:53,010 --> 00:00:55,850 And you can read about complex numbers if you want. 14 00:00:56,430 --> 00:01:01,170 But again, that's something that you don't need to worry ninety nine point nine percent of the time. 15 00:01:02,010 --> 00:01:08,760 Another thing I want to talk to you about is this idea that these integers and floats get stored such 16 00:01:08,760 --> 00:01:14,910 as five in memory as binary, that is as binary numbers, ones and zeros. 17 00:01:15,570 --> 00:01:21,630 And there's actually an action or function that we can use in Python called Behn for binary. 18 00:01:22,320 --> 00:01:27,290 And you can see that a bin returns the binary representation of an integer. 19 00:01:27,330 --> 00:01:32,910 So it's going to return whatever the binary version of five is, if I click run here. 20 00:01:34,510 --> 00:01:36,590 Well, I have to print, remember? 21 00:01:36,940 --> 00:01:38,230 So let's print. 22 00:01:40,240 --> 00:01:41,320 And click run. 23 00:01:42,960 --> 00:01:49,860 And I get the binary representation now instead of all zeros and ones, there's also this idea of B 24 00:01:50,370 --> 00:01:56,430 and that is what Python uses underneath the hood to say, hey, when I see this number with zero B. 25 00:01:56,460 --> 00:01:57,990 That's a binary number. 26 00:01:58,590 --> 00:02:02,160 But if I Google binary number five. 27 00:02:04,340 --> 00:02:12,170 I see that the binary number four five is one on one, which, again, that's what we see here. 28 00:02:13,640 --> 00:02:17,910 So that's really cool, really interesting just to know that it exists. 29 00:02:18,200 --> 00:02:23,930 By the way, just for fun, let's say that we want to turn this into a decimal, let's say where the 30 00:02:23,930 --> 00:02:27,070 computer and we just retrieve this binary number. 31 00:02:28,100 --> 00:02:31,520 I can do it and then wrap this. 32 00:02:32,630 --> 00:02:35,810 Like this in single or double quotes? 33 00:02:36,780 --> 00:02:45,060 And then with the end, I can also say, hey, I want this return to a number that is base 10, which 34 00:02:45,060 --> 00:02:46,860 is what us humans use. 35 00:02:47,700 --> 00:02:49,800 So if I actually do print here. 36 00:02:51,160 --> 00:02:52,450 And click, Ron. 37 00:02:54,970 --> 00:03:02,740 Well, actually, we have to do base two here, right, because what we're saying is, hey, this number 38 00:03:02,740 --> 00:03:10,020 is base two and convert it to integer and base to number is, well, zeros and one, it's a binary number. 39 00:03:10,210 --> 00:03:11,500 So if I click on here. 40 00:03:13,040 --> 00:03:14,920 Look at that, I get five. 41 00:03:15,710 --> 00:03:21,740 So in your head, you can think of it this way when we story number like five, an integer like five, 42 00:03:22,070 --> 00:03:25,430 when a computer retrieves that number, let's say we're doing some additions. 43 00:03:25,790 --> 00:03:29,570 Well, it's going to grab this from memory. 44 00:03:29,570 --> 00:03:34,160 It's going to say, well, this is a binary number and I'm going to convert it into integer. 45 00:03:35,000 --> 00:03:36,140 Very, very cool. 46 00:03:36,440 --> 00:03:42,950 Now, the reason I taught this here, you won't see this a lot and beginner courses and especially so 47 00:03:42,950 --> 00:03:44,000 early in the course. 48 00:03:44,000 --> 00:03:49,520 But I think it's an important principle, although you might not get tested on this ever for you to 49 00:03:49,520 --> 00:03:54,530 just understand how things are working underneath the hood, I believe is an important thing for you 50 00:03:54,530 --> 00:03:57,050 to do in order to become a great developer. 51 00:03:57,210 --> 00:03:59,740 So hopefully this doesn't confuse you too much. 52 00:04:00,110 --> 00:04:01,190 I'll see you in the next video. 53 00:04:01,550 --> 00:04:01,910 Bye bye.