1. Variables: Variables are used to store and manipulate data in
a program. They have a name, a data type, and a value. You can
assign values to variables and perform operations on them.
Common data types include integers (int), floating-point
numbers (float), characters (char), and strings (text).
2. Control Structures:
- Conditional Statements: Conditional statements allow you
to make decisions in your program based on certain conditions.
The most common conditional statement is the "if-else"
statement, which executes different blocks of code depending
on whether a condition is true or false.
- Loops: Loops are used to repeat a block of code multiple
times. The two most common types of loops are "for" loops and
"while" loops. A "for" loop repeats a set of instructions a
specific number of times, while a "while" loop repeats as long
as a certain condition is true.
3. Functions: Functions are blocks of code that perform a
specific task. They take inputs (arguments), process them, and
return a result. Functions help break down complex problems