Q. In linear programming, what does it mean to 'feasibly solve' a problem?
-
A.
Finding a solution that meets all constraints
-
B.
Maximizing the objective function
-
C.
Minimizing the number of variables
-
D.
Ignoring constraints
Solution
To 'feasibly solve' a linear programming problem means to find a solution that satisfies all the given constraints.
Correct Answer:
A
— Finding a solution that meets all constraints
Learn More →
Q. In linear programming, what is the purpose of an objective function?
-
A.
To define the constraints of the problem
-
B.
To represent the goal of the optimization
-
C.
To initialize variables
-
D.
To iterate through possible solutions
Solution
The objective function in linear programming represents the goal of the optimization, which is to maximize or minimize a certain value.
Correct Answer:
B
— To represent the goal of the optimization
Learn More →
Q. In pseudocode, how would you represent a decision structure?
-
A.
Using a loop
-
B.
Using an if-else statement
-
C.
Using a function call
-
D.
Using a variable assignment
Solution
In pseudocode, a decision structure is typically represented using an if-else statement to control the flow based on conditions.
Correct Answer:
B
— Using an if-else statement
Learn More →
Q. What does OOP stand for in programming?
-
A.
Object-Oriented Programming
-
B.
Optimized Operational Procedures
-
C.
Open Object Protocol
-
D.
Ordered Output Process
Solution
OOP stands for Object-Oriented Programming, a programming paradigm based on the concept of 'objects' which can contain data and code.
Correct Answer:
A
— Object-Oriented Programming
Learn More →
Q. What is a variable in the context of linear programming?
-
A.
A fixed value that cannot change
-
B.
A symbol representing a quantity that can change
-
C.
A type of loop used in algorithms
-
D.
A function that returns a value
Solution
In linear programming, a variable represents a quantity that can change and is used to formulate the objective function and constraints.
Correct Answer:
B
— A symbol representing a quantity that can change
Learn More →
Q. What is computational logic primarily concerned with?
-
A.
The syntax of programming languages
-
B.
The structure of data
-
C.
The reasoning and problem-solving processes
-
D.
The design of user interfaces
Solution
Computational logic is primarily concerned with the reasoning and problem-solving processes that can be expressed through algorithms and programming.
Correct Answer:
C
— The reasoning and problem-solving processes
Learn More →
Q. What is the role of constraints in linear programming?
-
A.
To define the limits within which the solution must lie
-
B.
To specify the objective function
-
C.
To initialize the variables
-
D.
To create loops in the algorithm
Solution
Constraints in linear programming define the limits within which the solution must lie, ensuring that the solution is practical and applicable.
Correct Answer:
A
— To define the limits within which the solution must lie
Learn More →
Q. Which of the following best describes a loop in programming?
-
A.
A way to store data
-
B.
A sequence of instructions that repeats until a condition is met
-
C.
A method to define a function
-
D.
A way to create objects
Solution
A loop is a control structure that allows a sequence of instructions to be executed repeatedly until a specified condition is met.
Correct Answer:
B
— A sequence of instructions that repeats until a condition is met
Learn More →
Q. Which of the following is a common debugging technique?
-
A.
Adding more variables
-
B.
Using print statements to track variable values
-
C.
Removing all loops
-
D.
Ignoring error messages
Solution
Using print statements to track variable values is a common debugging technique that helps identify where errors occur in the code.
Correct Answer:
B
— Using print statements to track variable values
Learn More →
Q. Which of the following is NOT a characteristic of functions in programming?
-
A.
They can take parameters
-
B.
They can return values
-
C.
They can only be called once
-
D.
They can encapsulate code
Solution
Functions can be called multiple times, so the statement that they can only be called once is NOT a characteristic of functions.
Correct Answer:
C
— They can only be called once
Learn More →
Showing 1 to 10 of 10 (1 Pages)