Skip to content
UNASPACE

Concepts

This content is for Programming. Switch to the latest version for up-to-date documentation.

In programming, concepts are the fundamental building blocks used to create software. Mastering these concepts allows developers to learn new languages more quickly and solve complex problems efficiently.

Variables are used to store data that can be manipulated by a program. Data types define the kind of data a variable can hold.

  • Common Data Types:
    • Integer: Whole numbers (e.g., 5, -10).
    • String: Text characters (e.g., "Hello, World!").
    • Boolean: True or false values.
    • Float/Double: Numbers with decimals (e.g., 3.14).

Control structures manage the flow of execution within a program.

  • Conditionals (if, else, switch): Decision-making based on specific conditions.
  • Loops (for, while): Repeating a block of code multiple times.

Functions are reusable blocks of code that perform a specific task. They helps in making code more modular and maintainable.

  • Parameters: Inputs passed into a function.
  • Return Value: The output produced by a function.

Data structures are specialized ways to organize and store data so it can be accessed and worked with efficiently.

  • Arrays/Lists: Collections of elements stored sequentially.
  • Objects/Dictionaries: Collections of key-value pairs.

An algorithm is a step-by-step procedure or formula for solving a problem. It describes exactly what the computer must do to achieve a specific result.

Programs use logical operators to compare values and make decisions.

  • Arithmetic: +, -, *, /
  • Comparison: ==, !=, >, <
  • Logical: AND (&&), OR (||), NOT (!)

Programs often have bugs or errors that need to be fixed.

  • Syntax Error: Mistakes in the rules of the language.
  • Logic Error: The program runs but produces the wrong result.
  • Runtime Error: An error that occurs while the program is running.
Built with passion by Ngineer Lab