School ICT Self Study

Programming Language Types

24 viewsG11-01. Programming
0

Understanding Programming Language Types

  1. What is the primary difference between machine language and assembly language?

  2. How does a procedural language differ from a declarative language?

  3. Explain the key feature that distinguishes structured programming from object-oriented programming.

  4. Why is Python considered a scripting language rather than a traditional programming language?

  5. What challenges do programmers face when using low-level languages compared to high-level languages?

Spread the love
Ruwan Suraweera Changed status to publish 22 hours ago
0

Answers and Descriptions

  1. Answer: Machine language consists of binary code (0s and 1s) directly executable by the CPU, while assembly language uses mnemonic codes (e.g., ADD, MOV) that are more human-readable but require translation into machine code.
    Description: Machine language is hardware-specific and difficult to write, while assembly language provides a slightly abstracted layer, using mnemonics to represent machine instructions, making it easier to program but still low-level.

  2. Answer: Procedural languages focus on step-by-step instructions to achieve a task (e.g., C), while declarative languages specify the desired outcome without detailing the steps (e.g., SQL).
    Description: Procedural languages emphasize control flow and explicit procedures, suitable for general-purpose programming. Declarative languages are used in domains like databases, where the system determines how to achieve the result, simplifying certain tasks.

  3. Answer: Structured programming organizes code into modular blocks (e.g., loops, conditionals) to improve clarity, while object-oriented programming uses objects and classes to encapsulate data and behavior.
    Description: Structured programming, as in Pascal, avoids unstructured jumps (e.g., GOTO), enhancing readability. Object-oriented programming, as in Java, builds on this by introducing inheritance and polymorphism, ideal for complex systems.

  4. Answer: Python is considered a scripting language because it is often used for automating tasks, rapid prototyping, and executing scripts without requiring compilation, though it can also function as a general-purpose programming language.
    Description: Scripting languages prioritize ease of use and flexibility, often interpreted at runtime (e.g., Python scripts for web automation). Traditional programming languages like C++ typically involve compilation and are used for system-level development.

  5. Answer: Low-level languages require detailed hardware knowledge, are error-prone, and are harder to debug, while high-level languages are more abstract, user-friendly, and portable across platforms.
    Description: Programming in machine or assembly language involves managing registers and memory directly, increasing complexity. High-level languages abstract these details, allowing focus on logic and functionality, but may sacrifice fine-grained control.

Spread the love
Ruwan Suraweera Changed status to publish 4 days ago
Write your answer.