Journey, Learnings, & Discoveries

  • Before taking this class I did not know much about coding or computer science so during the summer, a family friend taught me python and a little bit of javascript.
  • I read most of the Khan Academy AP CSP lessons and completed a few of the exercises.
  • I also learned a lot of what was on the College Board Quiz from the student teachings that we had in our classroom.
  • I discovered that I should review college board material and psuedo code frequently because I forgot some of the things that I learned and if I became more proficient in psuedo code I would be able to answer the questions faster.

    Things to Improve

  • The questions I got incorrect were all topic unit 3 or 5, so I should review those units and study them more before the AP Exam.
  • Learn more about libraries, different kinds of digital attacks, using abstactions to develop programs.

    Test Corrections

  • Question 13: A library system contains information for each book that was borrowed. Each time a person borrows or returns a book from the library, the following information is recorded in a database. Name and the unique ID number of the person who was borrowing the book Author, title, and the unique ID number of the book that was borrowed Date that the book was borrowed Date that the book was due to be returned Date that the book was returned (or 0 if the book has not been returned yet) Which of the following CANNOT be determined from the information collected by the system? Responses

    Answer: The total number of books that were never borrowed in a given year Explanation: The system only has information on the books that were borrowed so the books that are not borrowed will not be represented by the data

  • Question 23: A flowchart is a way to visually represent an algorithm. The flowchart below is used by an application to set the Boolean variable available to true under certain conditions. The flowchart uses the Boolean variable weekday and the integer variable miles.

Block Explanation Oval The start or end of the algorithm Diamond A conditional or decision step, where execution proceeds to the side labeled true if the condition is true and to the side labeled false otherwise Rectangle One or more processing steps, such as a statement that assigns a value to a variable The figure presents a flow chart of an algorithm. Beginning at the top of the flow chart, the algorithm begins with a step labeled Start, which flows into a conditional step labeled weekday = true. If the condition labeled weekday = true is true, the process flows into another conditional step labeled miles are less than 20. If the condition labeled weekday = true is false, the process flows into a processing step labeled available ← false. If the conditional step labeled miles are less than 20 is true, the process flows into a processing step labeled available ← true. If the conditional step labeled miles are less than 20 is false the process flows into the processing step available ← false. Both processing steps, available ← true and available ← false flow to the end of the algorithm. Which of the following statements is equivalent to the algorithm in the flowchart?

Answer:
The figure presents a block of code that consists of 1 line. Throughout the code there are nested blocks of code. Line 1: [begin block] available ← [Begin Block] [begin block] weekday [end block] AND [begin block] miles are less than 20 [end block] [End Block] [end block] Explaination: The sets availability to true when weekday is true and the miles is less and twenty and availibility is set to false otherwise. This code represents the same function.

  • Question 32: A student’s overall course grade in a certain class is based on the student’s scores on individual assignments. The course grade is calculated by dropping the student’s lowest individual assignment score and averaging the remaining scores.

For example, if a particular student has individual assignment scores of 85, 75, 90, and 95, the lowest score (75) is dropped. The calculated course grade is ( 85 + 90 + 95 ) / 3 = 90 .

A programmer is writing a program to calculate a student’s course grade using the process described. The programmer has the following procedures available.

Procedure Call Explanation Min (numList) Returns the minimum value in the list numList Sum (numList) Returns the sum of the values in the list numList The student’s individual assignment scores are stored in the list scores. Which of the following can be used to calculate a student’s course grade and store the result in the variable finalGrade?

Answer: finalGrade ← Sum (scores) - Min (scores) finalGrade ← finalGrade / (LENGTH (scores) - 1) Explaination: This code adds the individual scores and removes the lowest score. Then it divides the sum by one less than the number of scores to get the average of the test scores minus the one that was dropped.

  • Question 35: A programmer notices the following two procedures in a library. The procedures do similar, but not identical, things. Procedure MaxTwo (x, y) returns the greater of its two integer parameters. Procedure MaxThree (x, y, z) returns the greatest of its three integer parameters. Which of the following procedures is a generalization of the MaxTwo and MaxThree procedures? Answer: Procedure Max (numList), which returns the maximum value in the list of integers numList Explaination: MaxTwo and MaxThree determine the maximum among a group of given values. This procedure generalized is Max, which takes a list parameters as input to determine the max of any number of values
  • Question 48: Which of the following scenarios best exemplifies a phishing attack Answer: A user receives an e-mail from a sender offering technical help with the user’s computer. The e-mail prompts the user to start a help session by clicking a provided link and entering the username and password associated with the user’s computer. Explaination: Phising is used to trick the user into providing personal information. In this answer, the user is tricked into giving the attacker the username and password.