Let’s take up another problem of finding whether a given integer is even or odd. You may have a look at the problem statement from the coding quiz question at the end of the page before proceeding with the video.
The aim of this question to revise the if-else conditions and also to learn to draw a flow chart for every problem and to convert it to code. Let's see Sajan make a simple flow diagram to show how to solve the question.
Making the flow diagram is the same as representing the solution in a diagrammatic form. You may choose to write it and explain it in simple words too, but it is easier with a diagram.
Let us now see Sajan write a code for the same diagram that he explained above.