00:01
Hello student, here the question first is explain the difference between the algorithm pseudocode and the program.
00:05
So, algorithm pseudocode is a high -level description of the algorithm written in a natural language like syntax.
00:12
It is used to describe the step of an algorithm in a way that it is easy to understand without worrying about the specific detail of how the algorithm will be implemented in a programming language.
00:23
So, we do not care about how it will be implemented, how to use a control structure, how to use the proper syntax.
00:31
So, it is written in the natural language like english type language.
00:35
So, here the program.
00:37
Now program.
00:37
A program is a set of instructions that are written in the programming language to tell a computer what to do.
00:43
Here programming language can be java, can be c, can be python.
00:49
So here programming language here can be c, c++, java, python etc.
00:55
So to tell a computer what to do, programs are typically much more detailed than the algorithm pseudocodes and they must be specified enough that the computer can understand them.
01:06
So here i am taking the example of the pseudocode and the example of the program for the same problem.
01:11
So here problem is to find the largest number from the array.
01:15
So here i have taken the array.
01:18
The array elements are here 10, 5, 3, 2, 1.
01:23
So from this array i have to find the largest number.
01:26
So largest number initialize the first array element which is at the 0th location.
01:32
So here 10 number which is the largest number we have taken.
01:39
Now for loop, for the for loop i have to run this for loop from here to here.
01:47
So here i execute the for loop.
01:49
Now i have compared.
01:51
I have to compare if array of i is greater than largest number then the largest will be operated and it will become the number which is at the ith location.
02:01
So in this way the loop will execute and at last the loop will find the largest number and at the end means when we exit from the loop the number will be returned that will be the largest number.
02:12
So this is the pseudocode.
02:14
Now come to the program.
02:16
Here i have take the proper care how to write the program, how to use the syntax of a programming language here.
02:26
Suppose i am using the python.
02:28
So i have to take care the every syntax of the python language.
02:32
In pseudocode i write english type language.
02:35
I didn't care about the syntax.
02:37
So now i have to consider all the things...