1
00:00:02,080 --> 00:00:03,940
Hey, guys, what's up?

2
00:00:04,540 --> 00:00:08,620
So today we are going to see those operator.

3
00:00:11,200 --> 00:00:13,270
Tertiary operator.

4
00:00:17,050 --> 00:00:17,330
OK.

5
00:00:17,610 --> 00:00:18,600
So what it does.

6
00:00:19,980 --> 00:00:26,230
For example, if I were writing a phase of the DNC to see out positive.

7
00:00:26,320 --> 00:00:29,340
No see out positive.

8
00:00:31,130 --> 00:00:31,970
And it's.

9
00:00:33,640 --> 00:00:34,500
See out.

10
00:00:36,250 --> 00:00:36,870
Negative number.

11
00:00:41,920 --> 00:00:47,860
Now, with the help of a shady operator, I can also write it, so I will write something like.

12
00:00:49,230 --> 00:00:54,300
If he is in it, does it or if this condition is to seek out.

13
00:00:57,240 --> 00:00:57,800
Positive.

14
00:00:59,430 --> 00:01:05,250
And if this condition is falls, then see out negative.

15
00:01:08,310 --> 00:01:10,970
OK, so this is they use case of their shady operator.

16
00:01:12,750 --> 00:01:14,060
So how it works?

17
00:01:15,680 --> 00:01:17,330
So if this is my condition.

18
00:01:18,170 --> 00:01:19,490
OK, so this is my condition.

19
00:01:21,590 --> 00:01:25,580
So if the condition is true, this will be executed.

20
00:01:26,240 --> 00:01:30,380
So if the condition is true, this will be executed.

21
00:01:30,830 --> 00:01:36,260
And if the condition is false, then this will be executed.

22
00:01:38,400 --> 00:01:38,660
OK.

23
00:01:38,990 --> 00:01:43,190
So if the condition is false, this will be executed.

24
00:01:44,090 --> 00:01:45,830
So this is how it works.

25
00:01:46,550 --> 00:01:47,990
So let's say somewhat example.

26
00:01:50,200 --> 00:01:51,160
For example.

27
00:01:52,520 --> 00:01:53,170
Bulley.

28
00:01:54,490 --> 00:01:57,120
Is even is even is a variable.

29
00:01:58,250 --> 00:01:59,750
So is even.

30
00:02:01,500 --> 00:02:06,180
It goes let's say X is a X is also a variable integer variable.

31
00:02:06,540 --> 00:02:09,750
So if X more do it cause it equals zero.

32
00:02:10,200 --> 00:02:11,910
So this is my condition.

33
00:02:12,270 --> 00:02:14,040
So if this condition is true.

34
00:02:15,480 --> 00:02:16,530
I will return to.

35
00:02:18,280 --> 00:02:21,640
And if this condition is false, I will return false.

36
00:02:23,870 --> 00:02:28,150
OK, so you can also use this totally operator on the right hand side.

37
00:02:28,990 --> 00:02:30,480
Now what volume output?

38
00:02:30,610 --> 00:02:32,290
Let's say X equals six.

39
00:02:32,350 --> 00:02:35,920
And you are printing C out is even.

40
00:02:37,440 --> 00:02:39,420
So four X equals six.

41
00:02:39,810 --> 00:02:42,260
So this condition is true.

42
00:02:42,320 --> 00:02:46,140
So my output will be so easy when it's containing through some output will be when.

43
00:02:48,070 --> 00:02:52,040
OK, so let's ride called to get a better understanding.

44
00:03:01,850 --> 00:03:02,870
So let's name it.

45
00:03:03,200 --> 00:03:03,800
That is Sheree.

46
00:03:42,320 --> 00:03:45,770
OK, so let us solve the problem with the help of a shady operator.

47
00:03:46,550 --> 00:03:48,710
The problem is very simple.

48
00:03:49,460 --> 00:03:50,870
I will be given a number.

49
00:03:51,240 --> 00:03:55,040
OK, so I will take a number as input.

50
00:03:55,460 --> 00:04:02,590
And I have to print and I have to tell the user whether that number is even or whether the number is.

51
00:04:03,290 --> 00:04:09,950
So we have already started it with the help of a friend and now we will solve it with the help of by

52
00:04:10,070 --> 00:04:10,850
Shady Operator.

53
00:04:11,860 --> 00:04:13,520
OK, so let's do.

54
00:04:16,880 --> 00:04:22,820
So first of all, I am taking a variable and and so I see out.

55
00:04:28,540 --> 00:04:29,380
And there are no.

56
00:04:36,430 --> 00:04:38,020
Seeing and.

57
00:04:40,270 --> 00:04:45,470
Now, if so, it does show you we using by serial murder, so.

58
00:04:45,670 --> 00:04:48,330
And more to it consequence zero.

59
00:04:48,400 --> 00:04:49,480
So this is my condition.

60
00:04:50,020 --> 00:04:58,820
So if this condition is true, what I have to do, that means my number is even so sealed even.

61
00:05:00,070 --> 00:05:07,140
And if this condition is false, then this number is an art number.

62
00:05:07,250 --> 00:05:09,250
Associate ARED.

63
00:05:11,210 --> 00:05:11,950
And that is all.

64
00:05:12,660 --> 00:05:12,920
OK.

65
00:05:14,980 --> 00:05:16,240
So let's head Annette.

66
00:05:20,560 --> 00:05:23,530
So and there are no let's say number is five.

67
00:05:24,190 --> 00:05:25,810
So my number is ARED.

68
00:05:29,510 --> 00:05:31,430
And let's say my number is.

69
00:05:32,790 --> 00:05:35,620
For so I number is even.

70
00:05:38,140 --> 00:05:39,310
So how it is working?

71
00:05:42,070 --> 00:05:46,990
So, for example, if number is five, so I will check this condition.

72
00:05:47,770 --> 00:05:49,150
So five more.

73
00:05:49,220 --> 00:05:51,490
Two is not close to zero.

74
00:05:51,970 --> 00:05:53,500
So this condition is false.

75
00:05:54,370 --> 00:05:55,270
So I will come here.

76
00:05:55,960 --> 00:05:58,880
Condition is false and I will print see out.

77
00:06:00,790 --> 00:06:02,170
Now, if this condition.

78
00:06:04,140 --> 00:06:04,710
Now, let's see.

79
00:06:05,010 --> 00:06:07,230
And it was six.

80
00:06:07,740 --> 00:06:08,160
So.

81
00:06:09,550 --> 00:06:11,890
Six more, two equals zero.

82
00:06:12,040 --> 00:06:15,610
So this condition is true since this condition is true.

83
00:06:15,670 --> 00:06:16,540
I will come here.

84
00:06:18,570 --> 00:06:18,760
OK.

85
00:06:18,960 --> 00:06:20,700
I will Brint even.

86
00:06:23,110 --> 00:06:23,360
OK.

87
00:06:28,620 --> 00:06:32,790
So if this condition is through, this is made through Bart.

88
00:06:34,660 --> 00:06:38,950
OK, so this is true and this is false.

89
00:06:42,310 --> 00:06:42,490
OK.

90
00:06:42,630 --> 00:06:44,910
So in short condition.

91
00:06:47,490 --> 00:06:48,440
Question mark.

92
00:06:50,170 --> 00:06:55,630
If this condition is true, what do you to do then call them and then false?

93
00:06:56,930 --> 00:06:59,530
OK, so this is how I you operator.

94
00:07:00,630 --> 00:07:06,000
Works condition, then, if the condition is true and what do you want to do and if the condition is

95
00:07:06,000 --> 00:07:07,780
false, then what do you want to do?

96
00:07:08,960 --> 00:07:09,250
OK.

97
00:07:09,700 --> 00:07:11,770
So this is it for the shady operator.

98
00:07:12,430 --> 00:07:12,680
OK.

99
00:07:13,270 --> 00:07:13,710
Thank you.
