Python 6.7 : Addition or multiplication

We continue and here we notice that the code only does addition and we would like to do multiplication as well so we'll create a new variable I'll copy this I'll put o for equal operator and here I'll put zero and we'd like to do if the operator is zero then it's addition if the operator is one then it's multiplication so we'll create a variable that we'll call operator which is initialized to plus and if we create a local variable by putting calculation equal to a plus b at this level we'll check the value of the operator if, if o is equal to 1 then the operator is equal you will wonder why we didn't do the if and then the elif simply because by doing this by initializing a value to operator it's easier to manipulate and adapt that and here we're going to check the value of o if o equals 1 colon calculation equals a times b I'm going to run my code it's multiplication 7 times 7, 49 addition, 11 multiplication 8 times 2, 16 multiplication, 10 times 8 you can see we've had excellent, so that was it for this part and we'll see you very soon for a new section concerning the expertise of the function.