00:01
We're going to be creating a by -thon program that does basic calculations.
00:06
So if the user enters an addition symbol, it will add, a subtraction symbol, it will subtract, and etc.
00:16
So to do this, we need to create a function.
00:19
So let's name our function something like perform calc.
00:25
And we're going to have our parameters, which, what the information, that we need from our user.
00:38
So we're going to need the operator and two numbers.
00:44
So we're going to operator and two variables, which will name them and one and num2.
00:56
Now we're going to take this variable that we created in a parameter and we are going to pass the user to input the sign they would like.
01:13
So you can create a similar message where you tell the user to input the operation you would like to do multiplication, plus for add, subtraction, and so on.
01:30
So let's create an if statement.
01:32
So if the user enters the multiplication, we are going to take the one of the parameters, which is the number.
01:51
Number or num and i ask the user to input number and we can copy and paste this and change to 2 and we can then create another variable where we put the product and we do num times 2 and then we can print the product of these numbers and we can also have like a massive answer.
02:39
Answer is this...