Computer Science for IGCSE & O level - Algorithm Design And Problem Solving (Section 12)

  • 1
    What are the common elements of a trace table?
    Trả lời
    A
    B
    C
  • 2
    A check digit primarily helps to detect which type of error?
    Trả lời
    (C)
    Errors during data entry.
  • 3
    What is the main function of a 'length check' in data validation?
    Trả lời
    (B)
    To verify the number of characters in a data value.
  • 4
    What does the output 'Please enter the student's mark' indicate in the context of the given validation example?
    Trả lời
    (B)
    The program is requesting input from the user.
  • 5
    What type of symbol is used in a flowchart to show a process?
    Trả lời
    (B)
    Rectangle
  • 6
    What type of data validation ensures that data meets a specific set format?
    Trả lời
    (C)
    Format check
  • 7
    What is the purpose of trace tables in debugging an algorithm?
    Trả lời
    (C)
    To help in understanding the flow of the algorithm and how variables change during execution.
  • 8
    What does a trace table show?
    Trả lời
    (C)
    The values of variables as the algorithm runs.
  • 9
    What is the role of a format check during data validation?
    Trả lời
    (B)
    To ensure that the data follows a predefined structure (e.g., date, phone number).
  • 10
    When testing a program that calculates the average of a set of numbers, what type of test data should be used to verify it correctly handles the minimum and maximum possible input values?
    Trả lời
    (D)
    Extreme data
  • 11
    What is the main goal of the analysis phase in the program development life cycle?
    Trả lời
    (B)
    Identifying the inputs and outputs.
  • 12
    Which of the following is NOT a crucial element when creating an algorithm?
    Trả lời
    (D)
    Aesthetical presentation.
  • 13
    Which type of error can a check digit primarily help identify?
    Trả lời
    (C)
    Errors during data entry.
  • 14
    What is the purpose of a flowchart?
    Trả lời
    (C)
    To visually represent an algorithm or process.
  • 15
    What function is served by a type check during the data validation process?
    Trả lời
    (B)
    To guarantee the data is in the correct data type (e.g., text, integer).
  • 16
    What is the outcome when a `CASE OF` statement encounters a scenario not explicitly defined in the `CASE OF` structure, and no 'otherwise' case exists?
    Trả lời
    (B)
    An error or undefined behavior occurs.
  • 17
    What process ensures data meets specified criteria?
    Trả lời
    (C)
    Data validation
  • 18
    What is the expected result when testing with normal data?
    Trả lời
    (B)
    The algorithm should work correctly.
  • 19
    Which components or properties are key to the functionality of a loop structure?
    Trả lời
    B
    C
  • 20
    Which statements are commonly used for data input and output in pseudocode?
    Trả lời
    (C)
    INPUT and OUTPUT.
  • 21
    A type check verifies which aspect of the data?
    Trả lời
    (A)
    The type of the variable.
  • 22
    In the `FOR...TO...NEXT` loop, what does the loop counter variable do?
    Trả lời
    (B)
    Keeps track of the current iteration number.
  • 23
    What is the main goal when using a `CASE OF` structure?
    Trả lời
    (B)
    To run alternative code depending on the conditions.
  • 24
    Which data validation technique is employed to ensure that a user has provided an entry for a required field, such as an email address or a phone number?
    Trả lời
    (B)
    Presence Check
  • 25
    What is the purpose of `Index <- Index + 1` within a loop?
    Trả lời
    (C)
    To increment a counter.
  • 26
    What is the purpose of an algorithm?
    Trả lời
    A
    B
    C
    D
  • 27
    What is the key process being performed in the 'totaling' algorithm?
    Trả lời
    (B)
    Adding values to a running sum.
  • 28
    If you're testing a program that calculates student grades, which type of test data would be most appropriate to verify that it correctly handles the lowest possible score (0) and the highest possible score (100)?
    Trả lời
    (D)
    Extreme data
  • 29
    In the provided algorithm for checking a percentage mark, what is the condition that must be met for the algorithm to output 'Fail'?
    Trả lời
    (C)
    Percentage mark is not within the range of 0 to 100.
  • 30
    What is the purpose of a 'format check' in data validation?
    Trả lời
    (C)
    To ensure that data is in a specific pattern or structure.
  • 31
    What is a primary goal of a format check in data validation?
    Trả lời
    (C)
    To verify that the data conforms to a specified structure or pattern.
  • 32
    In data validation, what role does a check digit primarily serve?
    Trả lời
    (B)
    To detect errors introduced during data entry.
  • 33
    In a flowchart, what symbol is commonly used to denote the input or output of data?
    Trả lời
    (C)
    Parallelogram
  • 34
    What components are typically involved in calculating the average of a series of numbers in an algorithm?
    Trả lời
    A
    B
    C
  • 35
    Which of the following validation methods relies on the end-user checking the data?
    Trả lời
    (C)
    Screen/Visual check
  • 36
    What symbol is used in flowcharts to represent input or output operations?
    Trả lời
    (C)
    Parallelogram
  • 37
    Which of the following is a common step in using a check digit algorithm?
    Trả lời
    (B)
    Multiplying, adding, and subtracting.
  • 38
    In an algorithm, what operations are most commonly associated with the control structures `IF...THEN...ELSE` and `CASE OF`?
    Trả lời
    A
    C
  • 39
    In a search algorithm, what would indicate a successful search using a flag variable?
    Trả lời
    (B)
    The flag variable is set to TRUE.
  • 40
    Which type of test data is specifically used to check the limits or edge cases of an algorithm's input?
    Trả lời
    (C)
    Extreme Data
  • 41
    Decomposition involves breaking down a complex problem into...
    Trả lời
    (A)
    Smaller, more abstract parts
  • 42
    A trace table provides details about?
    Trả lời
    A
    B
    D
  • 43
    Which of the following is a characteristic of pseudocode?
    Trả lời
    (C)
    It uses a natural language-like syntax.
  • 44
    Which testing technique is primarily used for algorithms related to currency values?
    Trả lời
    (C)
    Boundary Data
  • 45
    Which loop structure is designed to perform an action or a set of actions repeatedly until a condition is met?
    Trả lời
    (B)
    REPEAT...UNTIL
  • 46
    What is the primary function of a 'presence check' validation?
    Trả lời
    (B)
    To ensure that a field has a value entered.
  • 47
    What would cause the algorithm `IF PasswordLength != 8 THEN OUTPUT “Your password must be exactly eight characters”` to display its output?
    Trả lời
    (D)
    Both the second and third conditions.
  • 48
    What data validation technique is used to confirm that the user has filled out a required field?
    Trả lời
    (C)
    Presence Check
  • 49
    During algorithm development, which action is performed to help in identifying and fixing errors?
    Trả lời
    (D)
    Creating test data.
  • 50
    In the given example of an algorithm validating a percentage mark, which error message would be displayed if the input was invalid?
    Trả lời
    (D)
    The student's mark should be in the range 0 to 100, please re-enter the mark