Difference between revisions of "PHP-and-MySQL/C2/Arithmatic-Operators/English-timed"

From Script | Spoken-Tutorial
Jump to: navigation, search
(Created page with '{|Border=1 !Time !Narration |- |0:00 |Welcome to this tutorial on basic arithmetic operators. |- |0:03 |I'll first go through plus, minus, multiply and divide operations. |- |0:0…')
 
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{|Border=1
 
{|Border=1
!Time
+
|'''Time'''
!Narration
+
|'''Narration'''
 
|-
 
|-
|0:00
+
|00:00
|Welcome to this tutorial on basic arithmetic operators.
+
|Welcome to this tutorial on basic '''Arithmetic Operators'''.
 
|-
 
|-
|0:03
+
|00:03
 
|I'll first go through plus, minus, multiply and divide operations.
 
|I'll first go through plus, minus, multiply and divide operations.
 
|-
 
|-
|0:09
+
|00:09
|These are written as p lus, minus, multiply as an asterisk and divide as a forward slash.
+
|These are written as plus (+), minus (-), multiply as an asterisk (*) and divide as a forward slash (/).
 
|-
 
|-
|0:17
+
|00:17
 
|So, I will have 2 variables.
 
|So, I will have 2 variables.
 
|-
 
|-
|0:20
+
|00:20
|I'll create a variable called "num1" and I'll save that as value equal to "10" and "num2" is equal to "2".
+
|I'll create a variable called "$num1" and I'll '''save''' that as value equal to 10 and "$num2" is equal to 2.
 
|-
 
|-
|0:30
+
|00:30
|So, these are both integer numbers with no decimal point.
+
|So, these are both '''integer''' numbers with no decimal point.
 
|-
 
|-
|0:34
+
|00:34
 
|Okay, now, say I want to add "num1" and "num2" together.
 
|Okay, now, say I want to add "num1" and "num2" together.
 
|-
 
|-
|0:40
+
|00:40
|So I echo out the answer of "num1" added to "num2".
+
|So I '''echo''' out the answer of "$num1" added to "$num2".
 
|-
 
|-
|0:44
+
|00:44
 
|Let's test it out.
 
|Let's test it out.
 
|-
 
|-
|0:47
+
|00:47
|So, that's "12".  10 and 2, num1 and num2, when 10 and 2 are added, the answer is "12".
+
|So, that's "12".  10 and 2, 'num1' and 'num2'; when 10 and 2 are added, the answer is "12".
 
|-
 
|-
|0:55
+
|00:55
|Okay now let's try minus. We will just replace the minus symbol there.
+
|Okay. Now let's try minus. We will just replace the minus symbol there.
 
|-  
 
|-  
|1:01
+
|01:01
|Refresh and that will be "8".
+
|'''Refresh''' and that will be "8".
 
|-
 
|-
|1:05
+
|01:05
|Now lets try multiplication. 10 times 2 is 20 and we've got "20".
+
|Now let's try multiplication. 10 times 2 is 20 and we've got "20".
 
|-
 
|-
|1:11
+
|01:11
 
|Next, 10 divided by 2 is just half of 10 which is "5".
 
|Next, 10 divided by 2 is just half of 10 which is "5".
 
|-
 
|-
|1:18
+
|01:18
 
|Now, what we can do is we can add something on the end of this.
 
|Now, what we can do is we can add something on the end of this.
 
|-
 
|-
|1:24
+
|01:24
|So, let's say this is divided by num2.  
+
|So, let's say this is divided by 'num2'.  
 
|-
 
|-
|1:27
+
|01:27
 
|So, what I think this operation will do is, it will add "num1" and "num2", so that is 10 and 2 which will give us 12 and then 12 divided by 2.
 
|So, what I think this operation will do is, it will add "num1" and "num2", so that is 10 and 2 which will give us 12 and then 12 divided by 2.
 
|-
 
|-
|1:39
+
|01:39
 
|So, 12 divided by 2 should give 6.
 
|So, 12 divided by 2 should give 6.
 
|-
 
|-
|1:43
+
|01:43
|But actually what this does is it takes num2 and divides it by num2 which will give 1 and add num1 to that.
+
|But actually what this does is, it takes 'num2' and divides it by 'num2' which will give 1 and add 'num1' to that.
 
|-
 
|-
|1:56
+
|01:56
 
|So, that means, instead of 6 we will get 11.
 
|So, that means, instead of 6 we will get 11.
 
|-
 
|-
|2:00   
+
|02:00   
|Now, the reason for this is that division operator will always work before addition operator.  The same with multiply  
+
|Now, the reason for this is that division operator will always work before addition operator.  The same with multiply.
 
|-
 
|-
|2:10
+
|02:10
 
|Now, to solve this, we should put brackets.
 
|Now, to solve this, we should put brackets.
 
|-
 
|-
|2:16
+
|02:16
 
|The brackets will say - we'll take this operation first, do whatever is in here and then continue to divide by whatever this could be an integer or a variable.  
 
|The brackets will say - we'll take this operation first, do whatever is in here and then continue to divide by whatever this could be an integer or a variable.  
 
|-
 
|-
|2:29
+
|02:29
|So, here what it will do is num1 plus num2 which is 10 plus 2 which gives us 12 divided by 2 which should give us 6.
+
|So, here what it will do is 'num1' plus 'num2' which is 10 plus 2 which gives us 12 divided by 2 which should give us 6.
 
|-
 
|-
|2:39
+
|02:39
|Let's refresh that and we can see that it worked!
+
|Let's '''refresh''' that and we can see that it worked!
 
|-
 
|-
|2:43
+
|02:43
|So, these are the basic arithmetic operators which are simple to use.
+
|So, these are the basic '''arithmetic operators''' which are simple to use.
 
|-
 
|-
|2:48
+
|02:48
 
|If you come across any problems, always  verify your calculations with a calculator to make sure they're working.
 
|If you come across any problems, always  verify your calculations with a calculator to make sure they're working.
 
|-
 
|-
|2:55
+
|02:55
 
|We'll see a few more of these soon.
 
|We'll see a few more of these soon.
 
|-
 
|-
|2:58
+
|02:58
|We'll learn about the increment arithmetic operator which increments by 1 but I'll use that a little later.  
+
|We'll learn about the '''increment arithmetic operator''' which increments by 1 but I'll use that a little later.  
 
|-
 
|-
|3:05
+
|03:05
|So, practice these and make sure you learn them well.
+
|Just practice these and make sure you learn them well.
 
|-
 
|-
|3:09
+
|03:09
|Thanks for watching. This is Arvind dubbing for the Spoken Tutorial project.
+
|Thanks for watching. This is Arvind, dubbing for the Spoken Tutorial project.

Latest revision as of 17:24, 19 May 2015

Time Narration
00:00 Welcome to this tutorial on basic Arithmetic Operators.
00:03 I'll first go through plus, minus, multiply and divide operations.
00:09 These are written as plus (+), minus (-), multiply as an asterisk (*) and divide as a forward slash (/).
00:17 So, I will have 2 variables.
00:20 I'll create a variable called "$num1" and I'll save that as value equal to 10 and "$num2" is equal to 2.
00:30 So, these are both integer numbers with no decimal point.
00:34 Okay, now, say I want to add "num1" and "num2" together.
00:40 So I echo out the answer of "$num1" added to "$num2".
00:44 Let's test it out.
00:47 So, that's "12". 10 and 2, 'num1' and 'num2'; when 10 and 2 are added, the answer is "12".
00:55 Okay. Now let's try minus. We will just replace the minus symbol there.
01:01 Refresh and that will be "8".
01:05 Now let's try multiplication. 10 times 2 is 20 and we've got "20".
01:11 Next, 10 divided by 2 is just half of 10 which is "5".
01:18 Now, what we can do is we can add something on the end of this.
01:24 So, let's say this is divided by 'num2'.
01:27 So, what I think this operation will do is, it will add "num1" and "num2", so that is 10 and 2 which will give us 12 and then 12 divided by 2.
01:39 So, 12 divided by 2 should give 6.
01:43 But actually what this does is, it takes 'num2' and divides it by 'num2' which will give 1 and add 'num1' to that.
01:56 So, that means, instead of 6 we will get 11.
02:00 Now, the reason for this is that division operator will always work before addition operator. The same with multiply.
02:10 Now, to solve this, we should put brackets.
02:16 The brackets will say - we'll take this operation first, do whatever is in here and then continue to divide by whatever this could be an integer or a variable.
02:29 So, here what it will do is 'num1' plus 'num2' which is 10 plus 2 which gives us 12 divided by 2 which should give us 6.
02:39 Let's refresh that and we can see that it worked!
02:43 So, these are the basic arithmetic operators which are simple to use.
02:48 If you come across any problems, always verify your calculations with a calculator to make sure they're working.
02:55 We'll see a few more of these soon.
02:58 We'll learn about the increment arithmetic operator which increments by 1 but I'll use that a little later.
03:05 Just practice these and make sure you learn them well.
03:09 Thanks for watching. This is Arvind, dubbing for the Spoken Tutorial project.

Contributors and Content Editors

Minal, Pratik kamble, Sandhya.np14