Additional Programming Techniques

    Cards (23)

    • What is an array in programming?
      An array is a static data structure that can hold a fixed number of data elements.
    • What must each data element in an array be?
      Each data element must be of the same data type.
    • How are elements in an array identified?

      The elements in an array are identified by an index number.
    • What is the index of the first element in an array?
      The first element in an array always has an index of 0.
    • What are the basic operations you should know how to perform on arrays in pseudo code?
      • Traverse
      • Add
      • Remove
      • Search
    • How can you traverse an array in Python?
      You can use a for loop to display each data element in order.
    • Can you insert new values into an array?
      No, you cannot insert new values into an array since its size is fixed.
    • What happens when you overwrite the fourth element in an array?
      It changes the value of that element to the new value provided.
    • How can you delete a value in an array?
      You can overwrite it with a blank space to make it appear deleted.
    • How do you search for a specific value in a large array?
      You need a for loop to check each element for the specific value.
    • What is a two-dimensional array?
      • A data structure that can hold data in multiple rows and columns.
      • All data must still be of the same data type.
    • How is the index represented in a two-dimensional array?
      The index has two values, representing row and column.
    • How do you print a specific data element from a two-dimensional array?
      You can use the index number to access the element directly.
    • How do you search for a specific value in a two-dimensional array?
      You will need two for loops, one for the row and another for the values of each row.
    • What is a record in programming?
      • A data structure that can store data of different data types.
      • Each record contains information about one person or thing.
      • Each piece of information is called a field.
    • What is a key field in a record?
      A key field is unique data that identifies each record.
    • What is SQL?
      SQL (Structured Query Language) is a language used to search for data in a database.
    • What is the format of an SQL statement?
      The format is: SELECT field1, field2, field3… FROM table WHERE criteria.
    • Write an example of an SQL statement using the Cars table.
      SELECT Make, Colour FROM Cars WHERE Miles > 1000 AND Age > 8.
    • What are wildcards in SQL?
      Wildcards are symbols used to substitute characters in SQL queries.
    • What does the * symbol represent in an SQL statement?
      The * symbol represents ALL fields in a table.
    • Write an example of an SQL statement using a wildcard.
      SELECT * FROM Cars WHERE Colour = "blue".
    • What are the questions related to Additional Programming Techniques in the exam?
      1. Describe the differences between a 1D array, 2D array, and record.
      2. Write code for various operations on a one-dimensional array.
      3. Write SQL statements based on the Cars table.
    See similar decks