1 00:00:00,600 --> 00:00:01,200 Welcome back. 2 00:00:01,680 --> 00:00:04,710 Let's continue our understanding of it and float. 3 00:00:05,730 --> 00:00:12,330 We talked about the idea of these two data types and how we can use operations on them that we're familiar 4 00:00:12,330 --> 00:00:18,510 with from math class, plus a few ones that maybe we haven't seen before, such as modulo or the double 5 00:00:18,510 --> 00:00:22,230 slash or the double multiply for the power of. 6 00:00:23,310 --> 00:00:29,910 Now, this is really cool because we can get our computers to do well math for us like a calculator, 7 00:00:30,000 --> 00:00:30,420 right? 8 00:00:31,400 --> 00:00:38,990 But a programming language also provides for us different actions that we can perform now besides these 9 00:00:38,990 --> 00:00:44,120 ones, we also learned that there's a type action that we can take. 10 00:00:44,150 --> 00:00:51,170 There's a print action that we can take, but there's also specific math type functions that aren't 11 00:00:51,170 --> 00:00:54,620 and are able to use that are built into Python. 12 00:00:56,600 --> 00:01:04,370 Now, these are called Wilmuth functions and functions, something we'll talk about later on are these 13 00:01:04,370 --> 00:01:06,830 actions that we've been talking about. 14 00:01:07,770 --> 00:01:13,590 Remember our diagram here, we're starting to learn about the data types and the actions that we can 15 00:01:13,590 --> 00:01:17,500 perform on them now in most programming languages. 16 00:01:17,640 --> 00:01:22,070 These actions are called functions, and we have a whole section on them. 17 00:01:22,260 --> 00:01:26,190 But for now, there are some functions that we can use. 18 00:01:26,850 --> 00:01:28,600 So this is a print function. 19 00:01:28,740 --> 00:01:35,070 This is a type function, but there's specific math functions such as around. 20 00:01:36,440 --> 00:01:44,090 And you see right away, when I type, Reppel is a tool like an ad that hints and tells us what we can 21 00:01:44,090 --> 00:01:44,420 at. 22 00:01:45,430 --> 00:01:47,860 So says round and give me a number. 23 00:01:48,830 --> 00:01:53,040 And maybe and digit, but let's just worry about the first one for now. 24 00:01:53,300 --> 00:01:57,530 So around if I do three point one and I round here. 25 00:02:00,720 --> 00:02:01,090 Two. 26 00:02:01,920 --> 00:02:07,980 Well, that's not right, right, that's actually the result from up here, because we need to also 27 00:02:07,980 --> 00:02:16,320 tell it to perform with a function of print, hey, print to the screen, whatever the result of this 28 00:02:16,320 --> 00:02:16,560 is. 29 00:02:16,920 --> 00:02:19,830 And just to make things easier to see. 30 00:02:19,860 --> 00:02:21,240 I'm going to comment this out. 31 00:02:21,250 --> 00:02:24,120 So I'm just selecting everything and then pressing command. 32 00:02:24,750 --> 00:02:28,170 Or if you're on Windows control, if I click run. 33 00:02:30,060 --> 00:02:33,900 I get three because I'm rounding down the number. 34 00:02:34,790 --> 00:02:38,330 So let's say if it was three point nine, I click. 35 00:02:39,480 --> 00:02:42,360 And I get four again, I'm rounding the number. 36 00:02:43,850 --> 00:02:49,160 Another math function that's built into Python is something called a B. 37 00:02:49,160 --> 00:02:58,400 S, and you see right away that I get abs here and ABS returns the absolute value of the argument. 38 00:02:59,390 --> 00:03:04,700 And again, for those that aren't too familiar with math, an absolute value simply means, well, no 39 00:03:04,700 --> 00:03:05,510 negative numbers. 40 00:03:05,690 --> 00:03:09,770 So an absolute value of negative 20 is 20. 41 00:03:10,610 --> 00:03:15,380 And now because we know about math functions, I can start Googling, right? 42 00:03:15,500 --> 00:03:19,730 I can say, hey, I'm a python programmer and I want to learn about math functions. 43 00:03:19,940 --> 00:03:25,550 Well, I can go Python three math functions. 44 00:03:26,490 --> 00:03:34,440 And look at that right away, Google tells me that there's a ton that we can use, you don't have to 45 00:03:34,440 --> 00:03:35,600 memorize all of these. 46 00:03:35,610 --> 00:03:39,630 As a matter of fact, some of these I've never, ever used in my programming career. 47 00:03:40,200 --> 00:03:44,310 But it's good to know that they have these tools available to you. 48 00:03:44,530 --> 00:03:50,280 And as a programmer, this is something that you'll have to get used to, the idea that you won't actually 49 00:03:50,280 --> 00:03:59,760 memorize every single action that we can take for each data type, because some of these are very rarely 50 00:03:59,760 --> 00:04:01,980 used, some of them you'll never use in your career. 51 00:04:02,280 --> 00:04:05,400 The key is to understand how to Google them, how to find them. 52 00:04:05,850 --> 00:04:10,680 And throughout this course, I will show you the important ones that you're going to see over and over 53 00:04:10,920 --> 00:04:11,370 and over. 54 00:04:12,370 --> 00:04:18,490 But as a way for you to develop as a programmer, least you know that this is how you look for answers 55 00:04:18,490 --> 00:04:23,650 and find out that, hey, there's different math functions that we can use with numbers. 56 00:04:24,930 --> 00:04:27,510 All right, let's take a break and continue in the next video.