[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-440931-105":59,"doc-detail-440931-en":130},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","sample-questions-for-computer-science-a","Sample Questions for Computer Science A","","Representative multiple-choice practice questions for AP Computer Science A, including directions on answering strategy and scoring rules. The materials reference an answer key on a specified page, explain how to mark responses on an answer sheet, and describe assumptions for Java Quick Reference, class context, and method-call preconditions. The questions cover topics such as loops and conditional logic, list manipulation, method behavior, grading logic translation into Java, and selecting code that produces a target output.",{"@graph":69,"@context":122},[70,84,105],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":20,"@type":76,"position":81},"https://docshare.wps.com/document/exam/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/sample-questions-for-computer-science-a/440931/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/sample-questions-for-computer-science-a/440931.png","ImageObject",300,407,{"name":92,"@type":93},"nayy☆","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-15","2026-09-29",true,{"@type":102,"interactionType":103,"userInteractionCount":39},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"Where is the answer key for the multiple-choice questions listed?","Question",{"text":112,"@type":113},"The directions state that the answer key for the Computer Science A multiple-choice questions is on page 43.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"What scoring guidance is given for incorrect or unanswered responses?",{"text":117,"@type":113},"Points are not deducted for incorrect answers, and no points are awarded for unanswered questions. Students are encouraged to answer all questions.",{"name":119,"@type":110,"acceptedAnswer":120},"What assumptions should be made when applying the Java Quick Reference and context rules?",{"text":121,"@type":113},"The notes instruct students to assume the listed classes have been imported where appropriate, that variable and method declarations appear within an enclosing class, and that unqualified method calls appear within that enclosing class context. They also assume parameters are not null and that methods are called only when preconditions are satisfied, unless stated otherwise.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},440931,1791368608,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":39,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":144,"read_time":145},962090893153,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","Sample Questions for Computer Science A  \nComputer Science A: Sample Multiple-Choice Questions  \nFollowing is a representative set of questions. The answer key for the Computer Science A multiple-choice questions is on page 43. Multiple-choice scores are based on the number of questions answered correctly. Points are not deducted for incorrect answers, and no points are awarded for unanswered questions. Because points are not deducted for incorrect answers, students are encouraged to answer all multiple-choice questions. Students should eliminate as many choices as they can on any questions for which they do not know the answer, and then select the best answer among the remaining choices.  \nDirections: Determine the answer to each of the following questions or incomplete statements, using the available space for any necessary scratch work. Then decide which is the best of the choices given and fill in the corresponding circle on the answer sheet. No credit will be given for anything written in the examination booklet. Do not spend too much time on any one problem  \nNotes:  \n• Assume that the classes listed in the Java Quick Reference have been imported where appropriate.  \n• Assume that declarations of variables and methods appear within the context of an enclosing class.  \n• Assume that method calls that are not prefixed with an object or class name and are not shown within a complete class definition appear within the context of an enclosing class.  \n• Unless otherwise noted in the question, assume that parameters in method calls are not null and that methods are called only when their preconditions are satisfied.  \n18 © 2014 The College Board. Visit [the College Board on the Web: www.collegeboard.org](the College Board on the Web: www.collegeboard.org).  \nSample Questions for Computer Science A  \n1. Consider the following code segment.  \nfor (int k = 0; k \u003C 20; k = k + 2)  \n{  \nif (k % 3 == 1)  \n{  \nSystem.out.print(k + \" \");  \n}  \n}  \nWhat is printed as a result of executing the code segment?  \n(a) 4 16  \n(b) 4 10 16  \n(c) 0 6 12 18  \n(d) 1 4 7 10 13 16 19  \n(e) 0 2 4 6 8 10 12 14 16 18  \n2. Consider the following code segment.  \nList\u003CString> animals = new ArrayList\u003CString>();  \nanimals .add(\"dog\");  \nanimals .add(\"cat\");  \nanimals .add(\"snake\");  \nanimals .set (2, \"lizard\");  \nanimals .add (1, \"fish\");  \nanimals .remove(3);  \nSystem .out .println(animals);  \nWhat is printed as a result of executing the code segment?  \n(a) [dog, fish, cat]  \n(b) [dog, fish, lizard]  \n(c) [dog, lizard, fish]  \n(d) [fish, dog, cat]  \n(e) The code throws an ArrayIndexOutOfBoundsException exception.  \n© 2014 The College Board. Visit [the College Board on the Web: www.collegeboard.org.](the College Board on the Web: www.collegeboard.org. 19)[ 19](the College Board on the Web: www.collegeboard.org. 19)  \nSample Questions for Computer Science A  \n3. Consider the following method.  \npublic static void mystery(List\u003CInteger> nums)  \n{  \nfor (int k = 0; k \u003C nums .size (); k++)  \n{  \nif (nums .get (k) .intValue() == 0)  \n{  \nnums .remove(k);  \n}  \n}  \n}  \nAssume that a List\u003CInteger> values initially contains the following Integer values.  \n[0, 0, 4, 2, 5, 0, 3, 0]  \nWhat will values contain as a result of executing mystery(values) ?  \n(a) [0, 0, 4, 2, 5, 0, 3, 0]  \n(b) [4, 2, 5, 3]  \n(c) [0, 0, 0, 0, 4, 2, 5, 3]  \n(d) [0, 4, 2, 5, 3]  \n(e) The code throws an ArrayIndexOutOfBoundsException exception.  \n20 © 2014 The College Board. Visit [the College Board on the Web: www.collegeboard.org](the College Board on the Web: www.collegeboard.org).  \nSample Questions for Computer Science A  \n4. At a certain high school students receive letter grades based on the following scale.  \nInteger Score  Letter Grade  \n93 or above A  \nFrom 84 to 92 inclusive B  \nFrom 75 to 83 inclusive C  \nBelow 75 F  \nWhich of the following code segments will assign the correct string to grade for a given integer score ?  \nI. if (score >= 93)  \ngrade = \"A\";  \nif (score >= 84 && score ","cbCaicUn9ZuEFDrc","https://ap.wps.com/l/cbCaicUn9ZuEFDrc","pdf",274271,43,"English","# Directions\n# Notes\n# Sample Questions\n## Code Segment Output\n## List Operations and Printed Results\n## Method Effects on Lists\n## Grading Logic in Java\n## Output-Producing Code Segments\n## Object-Oriented Design for Car Data","[{\"question\":\"Where is the answer key for the multiple-choice questions listed?\",\"answer\":\"The directions state that the answer key for the Computer Science A multiple-choice questions is on page 43.\"},{\"question\":\"What scoring guidance is given for incorrect or unanswered responses?\",\"answer\":\"Points are not deducted for incorrect answers, and no points are awarded for unanswered questions. Students are encouraged to answer all questions.\"},{\"question\":\"What assumptions should be made when applying the Java Quick Reference and context rules?\",\"answer\":\"The notes instruct students to assume the listed classes have been imported where appropriate, that variable and method declarations appear within an enclosing class, and that unqualified method calls appear within that enclosing class context. They also assume parameters are not null and that methods are called only when preconditions are satisfied, unless stated otherwise.\"}]","Sample Questions for Computer Science A | PDF",1790693982,108]