source,graphics_name,topic,id,question,choice1,choice2,choice3,choice4,solution https://www.khanacademy.org/computing/ap-computer-science-principles/test/subject-challenge?modal=1,computerscience_2001,Computer Science,2001,"COMPUTER SCIENCE: Consider the following code segment. After the code runs, what value is stored in result?",11,5,3,8,5 https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2009,COMPUTER SCIENCE: What is the primary difference between lists and tuples?,"You can access a specific element in a list by indexing to its position, but you cannot access a specific element in a tuple unless you iterate through the tuple.","Lists are mutable, meaning you can change the data that is inside them at any time. Tuples are immutable, meaning you cannot change the data that is inside them once you have created the tuple.","Lists are immutable, meaning you cannot change the data that is inside them once you have created the list. Tuples are mutable, meaning you can change the data that is inside them at any time.","Lists can hold several data types inside them at once, but tuples can only hold the same data type if multiple elements are present.","Lists are mutable, meaning you can change the data that is inside them at any time. Tuples are immutable, meaning you cannot change the data that is inside them once you have created the tuple." https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2012,COMPUTER SCIENCE: What is the purpose of an if/else statement?,It tells the computer which chunk of code to run if the instructions you coded are incorrect.,"It runs one chunk of code if all the imports were successful, and another chunk of code if the imports were not successful.","It executes one chunk of code if a condition is true, but a different chunk of code if the condition is false.","It tells the computer which chunk of code to run if the is enough memory to handle it, and which chunk of code to run if there is not enough memory to handle it.","It executes one chunk of code if a condition is true, but a different chunk of code if the condition is false." https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2014,COMPUTER SCIENCE: When does a for loop stop iterating?,when it encounters an infinite loop,when it encounters an if/else statement that contains a break keyword,when it has assessed each item in the iterable it is working on or a break keyword is encountered,when the runtime for the loop exceeds O(n²),when it has assessed each item in the iterable it is working on or a break keyword is encountered https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2015,COMPUTER SCIENCE: What is runtime complexity of the list's built-in .append() method?,"O(1), also called constant time","O(log n), also called logarithmic time","O(n²), also called quadratic time","O(n), also called linear time","O(1), also called constant time" https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2022,COMPUTER SCIENCE: When would you use a for loop?,"Only in some situations, as loops are used only for certain type of programming.",When you need to check every element in an iterable of known length.,When you want to minimize the use of strings in your code.,When you want to run code in one file for a function in another file.,When you need to check every element in an iterable of known length. https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2025,COMPUTER SCIENCE: Which statement accurately describes how items are added to and removed from a stack?,a stacks adds items to the top and removes items from the bottom.,a stacks adds items to the top and removes items from the top.,a stacks adds items to the top and removes items from anywhere in the stack.,a stacks adds items to either end and removes items from either end.,a stacks adds items to the top and removes items from the top. https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2029,COMPUTER SCIENCE: What is the difference between class attributes and instance attributes?,"Instance attributes can be changed, but class attributes cannot be changed",Class attributes are shared by all instances of the class. Instance attributes may be unique to just that instance,There is no difference between class attributes and instance attributes,"Class attributes belong just to the class, not to instance of that class. Instance attributes are shared among all instances of a class",Class attributes are shared by all instances of the class. Instance attributes may be unique to just that instance https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2033,"COMPUTER SCIENCE: If you do not explicitly return a value from a function, what happens?",The function will enter an infinite loop because it will not know when to stop executing its code.,"If return keyword is absent, the function will return True.","If return keyword is absent, the function will return None.",The function will return a RuntimeError if you do not return a value.,"If return keyword is absent, the function will return None." https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2034,COMPUTER SCIENCE: What are the two main data structures in the Pandas library?,Arrays and DataFrames,Series and Matrixes,Matrixes and DataFrames,Series and DataFrames,Series and DataFrames https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/python/python-quiz.md,None,Computer Science,2035,COMPUTER SCIENCE: Which choice is an immutable data type?,dictionary,list,set,string,string https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/machine-learning/machine-learning-quiz.md,None,Computer Science,2037,COMPUTER SCIENCE: What is conditional probability?,"The probability of something, given that something else happened.",The probability that certain conditions are met,"The probability that, based on certain conditions, something will always be incorrect",The probability of something being the correct answer,"The probability of something, given that something else happened." https://github.com/Ebazhanov/linkedin-skill-assessments-quizzes/blob/master/machine-learning/machine-learning-quiz.md,None,Computer Science,2038,COMPUTER SCIENCE: What is the difference between unstructured and structured data?,Unstructured data is always text.,Unstructured data is much easier to store.,Structured data has clearly defined data types.,Sturctured data is much more popular.,Structured data has clearly defined data types. AP_CSP_sample_exam_2014,None,Computer Science,2047,COMPUTER SCIENCE: Under which of the following conditions is it most beneficial to use a heuristic approach to solve a problem?,When the problem can be solved in a reasonable time and an approximate solution is acceptable,When the problem can be solved in a reasonable time and an exact solution is needed,When the problem cannot be solved in a reasonable time and an approximate solution is acceptable,When the problem cannot be solved in a reasonable time and an exact solution is needed,When the problem can be solved in a reasonable time and an approximate solution is acceptable AP_CSP_sample_exam_2014,None,Computer Science,2048,COMPUTER SCIENCE: Which of the following are true statements about digital certificates in Web browsers?,Digital certificates are used to verify the ownership of encrypted keys used in secured communication.,Digital certificates are used to verify that the connection to a Web site is fault tolerant.,Both of the above.,Neither of the above.,Digital certificates are used to verify the ownership of encrypted keys used in secured communication. AP_CSP_sample_exam_2014,computerscience_2051,Computer Science,2051,COMPUTER SCIENCE: The figure shows a circuit composed of two logic gates. The output of the circuit is true. Which of the following is a true statement about input A?,Input A must be true.,Input A must be false.,Input A can be either true or false.,There is no possible value of input A that will cause the circuit to have the output true.,Input A must be true. AP_CSP_sample_exam_2014,computerscience_2052,Computer Science,2052,"COMPUTER SCIENCE: The table shows the time a computer system takes to complete a specified task on the customer data of different-sized companies. Based on the information in the table, which of the following tasks is likely to take the longest amount of time when scaled up for a very large company of approximately 100,000 customers?",Backing up data,Deleting entries from data,Searching through data,Sorting data,Sorting data https://www.khanacademy.org/computing/ap-computer-science-principles/x2d2f703b37b450a3:online-data-security/x2d2f703b37b450a3:cyber-attacks/e/computer-malware?modal=1,None,Computer Science,2056,COMPUTER SCIENCE: What is the difference between malware and a software bug?,Malware is designed to intentionally inflict damage on a computer; a software bug is an accident.,"Malware is only in code that is sent over the Internet, while bugs can happen in any software.",A piece of malware has a huge impact; a software bug only affects a few users.,"Malware is a part of computer hardware, not a part of computer software.",Malware is designed to intentionally inflict damage on a computer; a software bug is an accident. https://www.khanacademy.org/computing/ap-computer-science-principles/x2d2f703b37b450a3:digital-information/x2d2f703b37b450a3:number-limits-overflow-and-roundoff/e/number-limits--overflow--and-round-off?modal=1,None,Computer Science,2057,"COMPUTER SCIENCE: A civil engineer is writing code to calculate the center of gravity for a semi-ellipse; it uses the built-in constant PI. After running the code, they find the center of gravity in the y-axis is 14.120226551112957. Their colleague checks the result by running the same calculation on their own computer. Their program returns 14.120226551112925. The two values are very close, but not quite the same. Why?",One of the computers has a bug in its mathematical operations.,The two computers executed the arithmetic operations using a different order of operations.,One of the computers experienced an integer overflow error when calculating the result.,"The two computers represent the constant PI with a different level of precision, due to their rounding strategy or size limitations.","The two computers represent the constant PI with a different level of precision, due to their rounding strategy or size limitations." https://apcentral.collegeboard.org/pdf/ap-computer-science-principles-course-and-exam-description.pdf,None,Computer Science,2059,COMPUTER SCIENCE: Which of the following best explains how data is typically assembled in packets for transmission over the Internet?,"Each packet contains data to be transmitted, along with metadata containing information used for routing the data.","Each packet contains an encrypted version of the data to be transmitted, along with metadata containing the key needed to decrypt the data.",Each packet contains only the metadata used to establish a direct connection so that the data can be transmitted.,"Each packet contains multiple data files bundled together, along with metadata describing how to categorize each data file.","Each packet contains data to be transmitted, along with metadata containing information used for routing the data."