Summary

Cards (19)

  • What is a syntax error in programming?
    An error in the grammar of the program that breaks the rules of the programming language
  • Give an example of a syntax error.
    Misspelling a word in the code
  • What is a logical error in programming?
    A glitch that occurs in a game due to incorrect logic in the code
  • What does iterative testing mean?
    Testing the code during development as you write the code
  • How does the kitchen computer system determine if a student has enough money for a meal?
    It uses an algorithm that checks the account balance against the meal cost
  • What is the error type for line number 08 in the algorithm?
    Syntax error
  • What is the correct pseudocode for line number 08?
    print
  • What are the toll charges for different vehicle types between 6am and 10pm?
    • Motorcycle: £1.00
    • Car: £2.00
    • Goods vehicle: £2.50
    • HGV and coaches: £5.00
  • What happens to the toll charge after 10pm and before 6am?
    There is no charge
  • What is the expected result for Charge when testing a motorcycle at 1245?
    1. 00
  • What is the expected result for Charge when testing a car at 2200?
    0.00
  • What is the error in the provided program regarding number comparison?
    The inputs are treated as strings, not numbers
  • What type of error is present in the program that compares two numbers?
    Logic error
  • How can the error in the number comparison program be fixed?
    Convert the inputs to integers before comparison
  • What should be included in the test plan for input validation?
    • Variable to be accepted
    • Validation to repeat the input
  • What are the expected results for the angle calculation test?
    • Good data: Angle is 120
    • Bad data: Validation to repeat the input
  • What is the expected result for the shape output test with a valid input of 4?
    • A square is drawn
  • What is the expected result for the shape output test with a boundary input of 0?
    • A circle is drawn
  • What is the purpose of the test plan in programming?
    • To validate the functionality of the program
    • To identify errors and ensure correct outputs