1 00:00:00,600 --> 00:00:02,950 Hello and welcome in bidlake chore. 2 00:00:03,120 --> 00:00:13,290 I'm going to explain what the boolean data type is a bully datatype usually has two values which is 3 00:00:13,350 --> 00:00:16,760 either true or false. 4 00:00:17,220 --> 00:00:22,410 This is common when you are program in Ruby or any other languages. 5 00:00:22,740 --> 00:00:31,950 You may want to compare values and usually you use operators different types of operators to compare 6 00:00:31,950 --> 00:00:32,740 values. 7 00:00:32,940 --> 00:00:38,370 And usually that will return either a true or false. 8 00:00:39,000 --> 00:00:44,270 So let me illustrate how you can get a bullion value. 9 00:00:44,610 --> 00:00:46,680 So I'm going to start by greeting. 10 00:00:46,710 --> 00:00:47,020 Hey. 11 00:00:47,040 --> 00:00:48,810 Couple of variables. 12 00:00:48,870 --> 00:00:59,850 Well a quick variable cost X and give me the value of four I'll create a variable called Y and give 13 00:00:59,850 --> 00:01:08,990 you the value of 6 so I can make some comparison to get bullion data type. 14 00:01:09,210 --> 00:01:15,310 I can see x value of x equals 2. 15 00:01:17,270 --> 00:01:18,490 Y. 16 00:01:18,790 --> 00:01:27,160 That is definitely not the case because X is for why he thinks that will return a bullion value which 17 00:01:27,160 --> 00:01:30,190 is false. 18 00:01:30,260 --> 00:01:32,270 I try my expression. 19 00:01:32,560 --> 00:01:36,120 I can see the variable y. 20 00:01:37,480 --> 00:01:42,270 Is not equal to the variable. 21 00:01:42,280 --> 00:01:44,310 Thanks. 22 00:01:44,820 --> 00:01:48,730 And that should return him bullion value off. 23 00:01:48,950 --> 00:01:50,100 True. 24 00:01:50,740 --> 00:01:54,410 K seem to have some aero there. 25 00:01:54,930 --> 00:01:59,060 So I've done that again and is returned true here. 26 00:01:59,230 --> 00:02:05,850 The reason I had an error here if you look at it when you leave this base it gives a different result. 27 00:02:05,840 --> 00:02:14,560 So I've said why is not equal to x so I'm say I am comparing the value variable the value of the variable 28 00:02:14,560 --> 00:02:20,570 y and x and this return boolean value of true. 29 00:02:20,720 --> 00:02:25,730 So let's do a couple more examples. 30 00:02:25,870 --> 00:02:28,440 One see the variable y. 31 00:02:30,270 --> 00:02:37,240 Is greater than or equal to the variable x. 32 00:02:37,880 --> 00:02:42,650 And that she return for Sorry less than that is a less than sign. 33 00:02:42,650 --> 00:02:44,070 Apologies for that. 34 00:02:44,150 --> 00:02:48,110 That is less than saying he returned for's value. 35 00:02:48,110 --> 00:02:56,700 So let me do a greater than science I do Y is greater than or equal to X.. 36 00:02:56,840 --> 00:02:58,530 I should get. 37 00:02:58,550 --> 00:03:06,770 True right so that's how you play around with bullions boole is also referred to as a ball sometime. 38 00:03:07,010 --> 00:03:10,500 So boolean value will give you one or the other. 39 00:03:10,600 --> 00:03:15,050 They give you a true or false one to try. 40 00:03:15,050 --> 00:03:19,240 One more example using a logic called operate. 41 00:03:19,340 --> 00:03:23,410 So I am going to say the variable y. 42 00:03:25,590 --> 00:03:29,190 It's less than 10. 43 00:03:30,280 --> 00:03:31,240 Okay. 44 00:03:31,690 --> 00:03:38,140 And when to use a logical operator to compare it with another value some consider variable y is less 45 00:03:38,140 --> 00:03:42,410 than 10 and the variable X.. 46 00:03:43,520 --> 00:03:45,880 Is less than 2. 47 00:03:46,370 --> 00:03:48,760 So I expect that to be true. 48 00:03:49,110 --> 00:03:51,930 If he is returned a value of true. 49 00:03:51,950 --> 00:03:58,850 So basically that's what bullion's are billions you can do if you want to compare values of different 50 00:03:58,850 --> 00:04:06,680 data type or different types of objects or variables you can use boolean value and the data type that 51 00:04:06,680 --> 00:04:11,390 it will return will be in boolean values to give you the two results. 52 00:04:11,390 --> 00:04:11,960 I doubt it. 53 00:04:11,960 --> 00:04:14,700 True or false. 54 00:04:14,750 --> 00:04:20,400 So when you hear the term boolean just remember it is a data type that has only two values and that 55 00:04:20,450 --> 00:04:22,720 true or false. 56 00:04:22,730 --> 00:04:25,070 Many thanks for watching and bye for now.