Are you one of those who feel programming languages and algorithms are extremely hard to understand and you have no clue where to even start? Or you have a bit of an idea about them and want to expand your knowledge? Then you are in the right place.
Imagine yourself in a dark room having only one light bulb off. You will just have two options then, either to remain in the dark or turn on the lights. These “on” and “off” conditions can be treated as a signal for a person outside the window of the room.
Algorithms are everywhere! They are so incorporated and embedded in our daily lives that they completely escape our notice. How does your mom prepare her mouth-wateringly delicious dishes? She has a secret recipe. This recipe is an algorithm.
As we said, during writing code, coders often can get confused due to the complexity of various algorithms. As a result, it becomes difficult to shape the flow of the program. Flowcharts are interesting tools to help us out and to get a broad idea of our code.
Remember those questions in maths whose solutions started with the famous “Let’s assume the answer to be x ”. You used to dutifully solve tedious equations to find the value of x and this value came out different for different questions.
Conditional statements are used for decision making. The process is similar to what we do in real life. If a specified condition is true then a particular block of statements is executed and if not then the other one. Notice how we used ‘if’ and ‘if not’ in the previous lines?
Remember scanf and printf discussed in the input and output section of this blog? We gave a hint that these were functions and briefly discussed what functions are. Let’s elaborate on that in this section. So, we know that when we write printf(“zine”), the computer gets a command to print “zine” on the screen.
Throughout this journey, you learned a lot about bits and bytes, flowcharts and pseudocode, programming and it’s various core constructs, and finally algorithms. Well, we hope you did. Before wrapping up, there’s one very important thing that remains.