1 00:00:00,330 --> 00:00:01,230 Welcome back. 2 00:00:01,260 --> 00:00:07,800 This is a quick optional video that well, with something that you probably won't use, but I want you 3 00:00:07,800 --> 00:00:09,660 to just know that it's out there. 4 00:00:09,750 --> 00:00:16,020 And that is there's actually an extra data type that I didn't talk about, and it's called complex. 5 00:00:16,020 --> 00:00:20,340 And as the name suggests, it's pretty complex. 6 00:00:20,760 --> 00:00:31,950 However, a complex number, again, is a number that is a third type instead of int and float. 7 00:00:31,980 --> 00:00:34,660 We also have this type for numbers. 8 00:00:34,680 --> 00:00:41,340 Now the reason I'm not really teaching complex is that you only use this if you're doing something really, 9 00:00:41,340 --> 00:00:42,870 really complex math. 10 00:00:42,900 --> 00:00:45,050 Most of the time you'll never use it. 11 00:00:45,060 --> 00:00:50,310 I personally have never used it, but it is good to know that it exists. 12 00:00:50,610 --> 00:00:56,040 It's the equivalent to a real number and you can read about complex numbers if you want. 13 00:00:56,280 --> 00:00:59,290 But again, that's something that you don't need to worry. 14 00:00:59,310 --> 00:01:01,350 99.9% of the time. 15 00:01:02,030 --> 00:01:08,720 Another thing I want to talk to you about is this idea that these integers and floats get stored, such 16 00:01:08,720 --> 00:01:15,080 as five in memory as binary, that is as binary numbers, ones and zeros. 17 00:01:15,440 --> 00:01:21,770 And there's actually an action or function that we can use in Python called bin for binary. 18 00:01:22,190 --> 00:01:27,260 And you can see that a bin returns the binary representation of an integer. 19 00:01:27,260 --> 00:01:31,250 So it's going to return whatever the binary version of five is. 20 00:01:31,430 --> 00:01:33,050 If I click run here. 21 00:01:34,490 --> 00:01:36,710 Well, I have to print, remember? 22 00:01:36,800 --> 00:01:38,390 So let's print. 23 00:01:40,190 --> 00:01:41,510 And Click Run. 24 00:01:42,880 --> 00:01:47,810 And I get the binary representation now instead of all zeros and ones. 25 00:01:47,860 --> 00:01:55,240 There's also this idea of B, and that is what Python uses underneath the hood to say A when I see this 26 00:01:55,240 --> 00:01:58,150 number with zero B, that's a binary number. 27 00:01:58,480 --> 00:02:02,320 But if I Google binary number five. 28 00:02:04,270 --> 00:02:12,340 I see that the binary number for five is 101, which again, that's what we see here. 29 00:02:13,530 --> 00:02:15,620 So that's really cool. 30 00:02:15,630 --> 00:02:16,470 Really interesting. 31 00:02:16,470 --> 00:02:22,800 Just to know that it exists, by the way, just for fun, let's say that we want to turn this into a 32 00:02:22,800 --> 00:02:23,220 decimal. 33 00:02:23,220 --> 00:02:27,210 Let's say we're the computer and we just retrieve this binary number. 34 00:02:28,050 --> 00:02:31,740 I can do it and then wrap this. 35 00:02:32,590 --> 00:02:36,010 Like this in single or double quotes. 36 00:02:36,700 --> 00:02:45,070 And then with the inte, i can also say, hey, I want this return to a number that is base ten, which 37 00:02:45,070 --> 00:02:47,080 is what us humans use. 38 00:02:47,530 --> 00:02:49,930 So if I actually do print here. 39 00:02:51,090 --> 00:02:52,620 And Click Run. 40 00:02:54,810 --> 00:02:59,100 Well, actually, we have to do base two here, right. 41 00:02:59,100 --> 00:03:06,960 Because what we're saying is, hey, this number is base two and convert it to integer and base two. 42 00:03:06,960 --> 00:03:08,780 Number is all zeros and one. 43 00:03:08,790 --> 00:03:10,080 It's a binary number. 44 00:03:10,080 --> 00:03:11,670 So if I click run here. 45 00:03:12,940 --> 00:03:13,770 Look at that. 46 00:03:13,780 --> 00:03:15,100 I get five. 47 00:03:15,610 --> 00:03:18,700 So in your head you can think of it this way. 48 00:03:18,700 --> 00:03:24,220 When we store a number like five, an integer like five, when a computer retrieves that number, let's 49 00:03:24,220 --> 00:03:25,630 say we're doing some addition. 50 00:03:25,630 --> 00:03:29,560 Well, it's going to grab this for memory. 51 00:03:29,560 --> 00:03:34,300 It's going to say, well, this is a binary number and I'm going to convert it into integer. 52 00:03:35,020 --> 00:03:36,280 Very, very cool. 53 00:03:36,310 --> 00:03:42,940 Now, the reason I taught this here, you won't see this a lot in beginner courses and especially so 54 00:03:42,940 --> 00:03:47,590 early in the course, but I think it's an important principle, although you might not get tested on 55 00:03:47,590 --> 00:03:48,550 this ever. 56 00:03:48,580 --> 00:03:53,890 For you to just understand how things are working underneath the hood, I believe, is an important 57 00:03:53,890 --> 00:03:57,130 thing for you to do in order to become a great developer. 58 00:03:57,130 --> 00:03:59,980 So hopefully this doesn't confuse you too much. 59 00:04:00,010 --> 00:04:01,390 I'll see you in the next video. 60 00:04:01,420 --> 00:04:02,080 Bye bye.