Algorithm
A precise sequence of instructions or rules designed to perform a specific task or solve a problem.
Finite (Characteristic)
An algorithm must terminate after a finite number of steps to avoid running indefinitely.
Definite (Characteristic)
Each step of the algorithm must be precisely defined, leaving no ambiguity in actions.
Effective (Characteristic)
The algorithm should solve the problem using a clear, logical procedure within a reasonable time and resources.
Efficiency (Algorithm Importance)
Efficient algorithms can significantly improve software performance by reducing time and resources.
Scalability (Algorithm Importance)
Well-designed algorithms can handle large inputs effectively, crucial for big data and complex computations.
Reusability (Algorithm Importance)
Algorithms can be reused across programs, saving development time and ensuring consistency.
String
A sequence of characters enclosed in quotes, used for storing text and characters.
Integer
A whole number without a fractional component, used for counting and indexing.
Real Number
Includes whole numbers and fractions, used for precision with fractional values.
Variable Declaration
Specifying a variable's name and data type to allocate appropriate memory space.
Variable Assignment
Memory Allocation (Variable Declaration Importance)
Helps in allocating the right amount of memory for the variable.
Type-Checking (Variable Declaration Importance)
Ensures type-safe operations on variables to prevent errors.
Readability (Variable Declaration Importance)
Improves code readability by making data types and variable purposes clear.
Maintainability (Variable Declaration Importance)
Easier code updates and management when variables are declared.
Addition
Summing numbers for calculations like totals and quantities.
Subtraction
Finding the difference between numbers for computations like remaining amounts.
Multiplication
Calculating the product of numbers for computations like area or volume.
Real Division
Dividing numbers to get a fractional result for computations like rates.
Displaying Information
Outputting data to show program results and state, aiding user feedback and debugging.
Identifier Names
Names given to variables, functions, and entities in code for easier reference and understanding.
Descriptive Names
Using names that clearly describe the purpose of variables or functions for readability.
Consistency
Sticking to a naming convention for uniformity in code.
Avoid Abbreviations
Avoiding abbreviations unless universally understood to ensure clarity in code.