Coding and programming have emerged as essential new-age skills that offer unique career options for youngsters. Keeping up with these trends, Hindustan Times started a coding Olympiad named HT Code-a-thon last year. The second edition of this coding competition, HT Code-a-thon 2021, started from August this year.
Alongside computer programming, it also aims towards advancing STEM education through collaboration with various partners including IBM. “IBM’s collaboration with HT Code-a-thon is a movement to empower young girls with STEM education that will help them break new grounds and grow. Code-a-thon Olympiad will elevate this cause to greater heights, inspire many more to join and grow the STEM education movement, says Tuhina Pandey, Communications Leader, IBM Global Digital Sales & South Asia CHQ, Communications.
Participating in a coding Olympiad will help kids master the essential concepts of computer programming. Two key concepts of coding include Function and Argument. Here is a low-down on them.
What is a function?
Functions are integral part of computer languages. Functions take parts of a computer code that in turn takes some inputs and uses them to accomplish a task. Simply put, you take two numbers, x and y as inputs and add them together to get you the sum z. But for functions to properly work, certain other aspects need to work simultaneously. This is where an argument comes in.
What is an argument?
An argument is a very fundamental aspect of coding and programming. It is the mechanism through which a coder or a programmer provides information to a function. The function can in turn use this information like a variable to carry out its work. In other words, when functions are created, data can be transformed in the form of an argument, also known as parameters. This means that every time a function is required, corresponding arguments are also invoked.
What needs to be remembered is that, specific functions require specific kinds of arguments. Once function comes into play, the arguments involved are assigned specific values which in turn allows the codes and programs to apply more information.
Most popular example of an argument (C++)
Suppose a programmer wants to create a function describing how much fun he is having. For this, he needs to use distinct words to be able to relay the information as clearly as possible. The original function may look something like this:
string HowMuchFun ()
{return “So Much Fun”;}
But this is a constant return value as it clearly mentions that the fun he is having is “so much.” This means, he can’t have more or little fun than this. This is where arguments provide an opportunity to change this constant into a variable, where the amount of fun can be interchangeable as per need.
Step-by-step instructions to use arguments