Science Exam ( Questions With
Complete Solutions )
1. Why variables are used in computer programs -
ANSWER ✔ It is used to store and manipulate data,
make code flexible and reusable, allow computer
programs to react to user input and calculated values
2. Programming Language Paradigms - ANSWER ✔
These are different styles or models of programming.
Each one has its own rules and approach to solving
problems.
3. Imperative Paradigm - ANSWER ✔ This style is all
about giving the computer exact instructions on what to
do — step by step.
,4. Characteristics of Imperative Paradigm - ANSWER ✔
Focus on how to do things, uses variables, loops, and
control flow, direct manipulation of program state.
5. Examples of Imperative Paradigm - ANSWER ✔ C,
Java, Python (partially imperative).
6. Procedural Paradigm - ANSWER ✔ This is a type of
imperative programming that groups instructions into
procedures (functions).
7. Characteristics of Procedural Paradigm - ANSWER ✔
Code is broken into procedures or functions, focus on
reusability and logical organization, still step-by-step,
but cleaner.
8. Examples of Procedural Paradigm - ANSWER ✔ C,
Pascal, BASIC, Fortran.
,9. Object-Oriented Paradigm - ANSWER ✔ Objects —
which combine data and actions into one unit.
10. Describe Object-Oriented Paradigm - ANSWER ✔ It
organizes programs into objects that have properties
(data) and methods (actions). Each object is responsible
for its own behavior.
11. Characteristics of Object-Oriented Paradigm -
ANSWER ✔ Uses classes and objects, supports
encapsulation, inheritance, and polymorphism, focuses
on reusable code and modular design.
12. Examples of Object-Oriented Paradigm - ANSWER
✔ Java, Python, C++, Ruby, C#.
13. Declarative Paradigm - ANSWER ✔ In the
declarative paradigm, you tell the computer what you
want, not how to do it.
, 14. Describe Declarative Paradigm - ANSWER ✔
Instead of giving step-by-step instructions, you declare
facts, rules, or relationships, and the system works out
the logic to reach the answer.
15. Characteristics of Declarative Paradigm - ANSWER
✔ Focuses on what to do, not how to do it, less concern
with control flow (no for-loops or step-by-step logic),
often used in math, databases, and AI.
16. Examples of Declarative Languages - ANSWER ✔
SQL, HTML, Prolog, Haskell (Functional), Lisp
(Functional).
17. Two basic models within Declarative Paradigm -
ANSWER ✔ Functional Model, Logic Model.
18. Describe Functional Model - ANSWER ✔ You build
programs using pure functions — like in math — and
avoid changing data.