Hey Guys, Welcome back to the next step.
Here Before we start Programming. Let's have some fun with Pseudo Coding.
Pseudo coding is nothing but writing your code in an order with some follow up of some universally understandable words. Here we don't follow strict syntax but we have a small amount of syntax which helps in understanding our code in a better way.
Coming to pseudo coding.
We can write any level of code in pseudo coding.
Let us write a pseudo code for adding two variables and storing in third variable and displaying the result variable.
This is the format of writing the pseudo code.
Coming to the code the first and last lines determines the start and end of the code.
Where as to take a variable or function we use INITIALIZE.
we will write DISPLAY to display the result or required data.
Let us write this program again with some dynamic programming touch.
Here Before we start Programming. Let's have some fun with Pseudo Coding.
Pseudo coding is nothing but writing your code in an order with some follow up of some universally understandable words. Here we don't follow strict syntax but we have a small amount of syntax which helps in understanding our code in a better way.
Coming to pseudo coding.
We can write any level of code in pseudo coding.
Let us write a pseudo code for adding two variables and storing in third variable and displaying the result variable.
- START.
- INITIALIZE VARIABLE a,b,c.
- a = 2.
- b = 3.
- ADD a AND b AND STORE THE RESULT IN c.
- DISPLAY c.
- STOP.
This is the format of writing the pseudo code.
Coming to the code the first and last lines determines the start and end of the code.
Where as to take a variable or function we use INITIALIZE.
we will write DISPLAY to display the result or required data.
Let us write this program again with some dynamic programming touch.
- START.
- INITIALIZE VARIABLE a,b,c.
- DISPLAY 'Welcome to the two values Adder'.
- DISPLAY 'Enter the first value : '.
- TAKE INPUT AND STORE IN a.
- DISPLAY 'Enter the second value : '.
- TAKE INPUT AND STORE IN b.
- ADD a AND b AND STORE RESULT IN c.
- DISPLAY 'The result of the adder is ',c.
- STOP.
This is how we will write a dynamic programming code. Although this is not important at first, but writing this way will help you in writing the Real time programs in a better way.
I will give a link with questions to write pseudo codes and you have to write pseudo codes to them and share them to me. You can upload your answers here.
Note to upload your answers:
please upload your answers in a folder with a name like this <YourName_Exercise_1>
and write all pseudo codes in one text document with a name like this <YourName_Exercise_1>.txt
You can contact me through mail <ukc895@gmail.com> and ask me your doubts.
Practice and Learn Programming in a real way. In next session I will explain you in detail about dynamic programming and I will explain you how to write functions and loops in the pseudo coding.
Note: I can take a video and share all these information to you but it is not the way to learn programming. If you want to program then you have to read and understand on your own.
No comments:
Post a Comment