BasicCodingConcepts
BasicCodingConcepts
Here are five of the most important coding concepts that every young
learner should know:
1. Variables
As the foundation of any computer programming language, variables act
as “containers” that “hold” information. These containers then store this
information for later use.
2. Data Structures
Data structures allow programmers to streamline data collection when a
large amount of related information is involved. Let’s go back to our
“visitorName” variable from above, but imagine the computer
programmer needs to store and reference 10 different visitors’ names
rather than just one.
3. Control Structures
A control structure analyzes variables and selects a direction in which to
go determined from the given parameters. For example, when a
computer program is running, the code is being read by the computer
line by line from top to bottom and (for the most part) left to right.
4. Syntax
Just like in the English language, computer programming follows
a syntax or a set of rules that define particular layouts of letters and
symbols. Proper syntax ensures the computer reads and interprets code
accurately.
5. Tools
In the physical world, tools allow workers to perform tasks that would
otherwise be extremely difficult (think of how a hammer helps drive a
nail into a piece of wood and what this job would be like without tools).
Similarly, a tool in computer programming is a piece of software that
helps programmers write code much faster.
Below, you'll find codes in three different programming languages (C++, Python, and
Java). Kindly adhere to the following instructions:
1. Conduct an online search and open three separate tabs for a Java compiler, a C++
compiler, and a Python compiler.
4. Find and write the five basic programming concepts in each of their codes.
..---------------------------------------------------------------------------------------------------------------
-------------------
**Python:**
print("Hello, World!")
.----------------------------------------------------------------------------------------------------------------
**C++:**
#include <iostream>
int main() {
std::cout << "Hello, World!" << std::endl;
return 0;
}
-----------------------------------------------------------------------------------------------------------------
**Java:**