1 00:00:00,000 --> 00:00:02,600 [no audio] 2 00:00:02,600 --> 00:00:03,800 Friends, here we are 3 00:00:03,800 --> 00:00:06,400 going to discuss about Python operators. 4 00:00:07,200 --> 00:00:11,400 So the concepts are like you know, what is an operator and 5 00:00:11,400 --> 00:00:14,500 what are the different types of operators present in your 6 00:00:14,500 --> 00:00:16,700 Python scripting, right? 7 00:00:17,100 --> 00:00:18,000 Let me start that. 8 00:00:19,600 --> 00:00:24,100 See basically operators are the pillars for any language, not 9 00:00:24,100 --> 00:00:30,500 only your python, okay, for any language operators are the pillars. 10 00:00:31,000 --> 00:00:34,800 So without operators you cannot write effective logic while 11 00:00:34,800 --> 00:00:37,900 writing your code. Right. Fine. 12 00:00:38,200 --> 00:00:40,200 Then, what is an operator? 13 00:00:41,100 --> 00:00:45,500 See the operator can be defined as a symbol which is responsible 14 00:00:45,500 --> 00:00:48,400 for a particular operation between two operands. 15 00:00:49,400 --> 00:00:53,000 Let me take simply two variables called 'x=2', and 16 00:00:53,000 --> 00:00:55,100 'y=3'. Now 17 00:00:55,100 --> 00:00:57,600 I need to find out the addition of these two variables, 18 00:00:57,600 --> 00:00:59,900 then I am going to take some other variable 19 00:00:59,900 --> 00:01:01,800 'result=x + y'. 20 00:01:01,800 --> 00:01:03,600 [no audio] 21 00:01:03,600 --> 00:01:07,000 Now here simply '+' is your operator, 22 00:01:07,000 --> 00:01:08,700 [no audio] 23 00:01:08,700 --> 00:01:10,400 and you are performing this 24 00:01:11,900 --> 00:01:17,300 addition on your two variables called 'x' and 'y'. Now in this 25 00:01:17,300 --> 00:01:21,500 expression if '+' is the operator, then 'x' and 'y' are called 26 00:01:21,600 --> 00:01:27,200 operands. Right. Of course '=' is also one of the operand. 27 00:01:27,400 --> 00:01:30,000 What we are doing with the help of '=' means, whatever the 28 00:01:30,000 --> 00:01:31,500 'result' you are getting, that 'result' 29 00:01:31,500 --> 00:01:33,100 we are assigning to this variable. 30 00:01:34,200 --> 00:01:37,100 So here addition is the action, here assignment is the action. 31 00:01:37,100 --> 00:01:39,010 [no audio] 32 00:01:39,000 --> 00:01:44,400 Right. So simply guys, operator is just simply your symbol like '+', 33 00:01:44,400 --> 00:01:46,300 '-', 'x'. 34 00:01:46,400 --> 00:01:49,200 We have some different symbols as well and we will see them. 35 00:01:50,200 --> 00:01:53,200 And there is an action with respect to your each and every 36 00:01:53,200 --> 00:01:56,800 symbol. So as of now we are using '+'. '+' we know it is 37 00:01:56,800 --> 00:01:58,800 used to add two values. 38 00:01:59,500 --> 00:02:02,000 Now those two values may be variables 39 00:02:03,100 --> 00:02:06,000 or sometimes directly you can substitute your values, 40 00:02:06,000 --> 00:02:08,000 let's say 3 + 2 41 00:02:08,000 --> 00:02:12,600 also I can do it, or I can store 'x' into some variable called 42 00:02:12,600 --> 00:02:19,000 'x=3', and I can perform 'x+2', or I can store even 43 00:02:19,000 --> 00:02:25,300 2 also into some variable then I can find 'x+y'. Right. 44 00:02:25,300 --> 00:02:28,600 Now if you observe your operator, this is your operator, 45 00:02:29,100 --> 00:02:32,800 as of now you are, I mean in this expression you are directly 46 00:02:32,800 --> 00:02:37,100 performing your operation on two values, but here one is 47 00:02:37,100 --> 00:02:40,800 variable and one is value, but here both are values. That 48 00:02:40,800 --> 00:02:45,600 means while performing your operation with the help of your operator, 49 00:02:46,100 --> 00:02:52,300 right, operands maybe values, or maybe variables, or combination 50 00:02:52,300 --> 00:02:54,000 of your values and variables. 51 00:02:55,400 --> 00:02:59,900 Right. So for simple example, you can take '+' is an operator 52 00:03:00,000 --> 00:03:05,200 to perform addition operation on your operands, right. Fine. 53 00:03:06,400 --> 00:03:11,200 Now Python provides a variety of operators like you know, 54 00:03:11,400 --> 00:03:15,900 arithmetic operators, assignment operators, comparison operators, 55 00:03:16,300 --> 00:03:20,800 identity operators, membership operators, and then logical 56 00:03:20,800 --> 00:03:24,200 operators, and finally we have bitwise operators. 57 00:03:24,400 --> 00:03:28,600 So these are the seven operators in your Python Scripting 58 00:03:28,600 --> 00:03:33,100 language. So before going to write your logic first of 59 00:03:33,100 --> 00:03:35,900 all you should be very, very good with your operators. 60 00:03:35,900 --> 00:03:37,900 [no audio] 61 00:03:37,900 --> 00:03:42,300 Right. And one more thing guys, before going to start each 62 00:03:42,300 --> 00:03:44,900 and every operators, right, here 63 00:03:45,100 --> 00:03:49,600 I am going to give you one idea. If you are able to remember 64 00:03:49,600 --> 00:03:51,600 that, as of now you can remember that. 65 00:03:51,600 --> 00:03:54,300 [no audio] 66 00:03:54,300 --> 00:03:59,900 That is like, see first two operators like arithmetic operators 67 00:03:59,900 --> 00:04:05,400 and assignment operators, for these two you are going to provide 68 00:04:05,400 --> 00:04:06,600 input as a value, 69 00:04:07,700 --> 00:04:11,500 and whatever the operators are there in your arithmetic and 70 00:04:11,500 --> 00:04:14,900 assignment they will do their action on your input, 71 00:04:15,700 --> 00:04:18,600 then it'll provide output also as a value. 72 00:04:18,600 --> 00:04:20,600 [no audio] 73 00:04:20,600 --> 00:04:25,700 Right. Then coming to next three operators, like comparison, 74 00:04:25,800 --> 00:04:27,800 identity, membership operators. 75 00:04:28,100 --> 00:04:31,900 So here we are going to provide input as a value. 76 00:04:33,000 --> 00:04:37,300 But these operators will perform some action on your inputs, 77 00:04:37,600 --> 00:04:41,000 and they will provide output as either 'True' or 'False'. 78 00:04:42,700 --> 00:04:45,400 See guys, for your first of two operators you are providing 79 00:04:45,400 --> 00:04:51,100 input as a value and you are getting output also value, but 80 00:04:51,100 --> 00:04:55,000 for next three operators you are providing input as your 81 00:04:55,000 --> 00:04:59,800 values and output you're going to get either 'True' or 'False', 82 00:04:59,800 --> 00:05:01,400 means you are getting Boolean values. 83 00:05:02,600 --> 00:05:07,000 Right. Then coming to logical operators, for this logical operators 84 00:05:07,000 --> 00:05:11,200 you are providing input as 'True' or 'False' and also output you're 85 00:05:11,200 --> 00:05:12,900 getting either 'True' or 'False'. 86 00:05:12,900 --> 00:05:15,100 [no audio] 87 00:05:15,100 --> 00:05:19,600 Then the last one is bitwise operators. See in bitwise operators 88 00:05:20,100 --> 00:05:23,300 you are going to provide input as a value and also you're 89 00:05:23,300 --> 00:05:25,100 getting output also value. 90 00:05:26,100 --> 00:05:30,700 I mean both inputs and outputs are values, but while performing 91 00:05:30,700 --> 00:05:34,900 the operation on your given values by your bitwise 92 00:05:36,200 --> 00:05:41,100 your data will be converted into bits or binary, and on that 93 00:05:41,100 --> 00:05:45,300 binary data logical operations will be performed. Then finally 94 00:05:45,300 --> 00:05:47,100 you're going to get your result as a value. 95 00:05:48,900 --> 00:05:52,200 So guys for time being if you are able to remember, just remember 96 00:05:52,200 --> 00:05:55,500 this structure so that it will be helpful while working with 97 00:05:55,500 --> 00:05:56,500 your operators. 98 00:05:57,700 --> 00:06:01,900 Right. So simply remember that first inputs need, first two operators 99 00:06:03,500 --> 00:06:09,000 input is a value and output also a value. Then for next three 100 00:06:09,000 --> 00:06:12,400 operators input is some value but output you're also getting 101 00:06:12,400 --> 00:06:16,600 some value but that is purely a Boolean data, that is 'True' 102 00:06:16,600 --> 00:06:21,000 or 'False'. Then for logical operators input is Boolean output 103 00:06:21,000 --> 00:06:25,900 is also Boolean data. Now for last one, bitwise operators input 104 00:06:25,900 --> 00:06:29,900 and output both are values, but while performing the operation 105 00:06:30,700 --> 00:06:34,200 by your bitwise operators on your given values, right, 106 00:06:34,200 --> 00:06:37,000 so directly they don't do. What it will do is, your data will 107 00:06:37,000 --> 00:06:40,900 be converted as a binary, and on that binary the logical operation 108 00:06:40,900 --> 00:06:42,700 will be performed on your inputs, 109 00:06:44,100 --> 00:06:47,300 okay. So this will be helpful if you are able to remember. 110 00:06:47,300 --> 00:06:48,500 You just try to remember this. 111 00:06:49,400 --> 00:06:51,200 Okay guys, thank you for watching this video. 112 00:06:51,200 --> 00:07:00,200 [no audio]