[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-314615-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-314615-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","ap-computer-science-principles-exam-reference-information-instruction-explanation-list-operations","AP Computer Science Principles - Exam Reference Information - Instruction Explanation - List Operations","","AP Computer Science Principles exam reference sheet providing concise instruction explanations and operator definitions for core programming concepts. Covers assignment, DISPLAY, and INPUT, arithmetic operators (+, -, *, /, MOD, RANDOM) with evaluation examples, relational and boolean operators (=, ≠, >, \u003C, ≥, ≤, NOT, AND, OR) producing Boolean results, plus control structures for selection (IF/ELSE) and iteration (REPEAT, REPEAT UNTIL). Includes list operations with indexing rules, assignment, access, and insertion behavior, along with error handling constraints.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/ap-computer-science-principles-exam-reference-information-instruction-explanation-list-operations/314615/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/ap-computer-science-principles-exam-reference-information-instruction-explanation-list-operations/314615.png","ImageObject",300,407,{"name":42,"@type":43},"Mack Lee","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-21","2026-09-20",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",6,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What does DISPLAY(expression) do in the AP CSA reference sheet?","Question",{"text":63,"@type":64},"It displays the value of expression, followed by a space.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"How are arithmetic operations evaluated, including order of operations and MOD?",{"text":68,"@type":64},"The order of operations used in mathematics applies when evaluating expressions, and MOD evaluates to the remainder when a is divided by b (with specified integer assumptions).",{"name":70,"@type":61,"acceptedAnswer":71},"What happens when a list index is out of range in list operations?",{"text":72,"@type":64},"If a list index is less than 1 or greater than the list length, the program produces an error message and terminates.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},314615,1790181269,{"code":4,"msg":82,"data":83},"success",[84,88,92,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":101,"show_sort_weight":102,"slug":103},"Technology",50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":33,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":105,"language":139,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":12,"update_tm":143,"read_time":144,"preview_page_count":4},1236954509970,"https://us-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","AP® Computer Science Principles  \n2026 EXAM REFERENCE INFORMATION  \nName:    \nNOTE: You may use any blank space in this booklet for scratch work during the exam. Proctors should collect this reference information at the conclusion of the exam.  \nExam Reference Sheet  \nInstruction Explanation  \nAssignment, Display, and Input  \n\n| Text:\u003Cbr>a ← expression\u003Cbr>Block: |  |  |  |  | Evaluates expression and then assigns a copy of the result to the variable a. |\n| --- | --- | --- | --- | --- | --- |\n| a ~~ ~~ expression |  |  |  |  |  |\n|  |  |  |  |  |  |\n| Text:\u003Cbr>DISPLAY(expression)\u003Cbr>Block: |  |  |  |  | Displays the value of expression, followed by a space. |\n| DISPLAY |  |  |  |  |  |\n|  | expression |  |  |  |  |\n|  |  |  |  |  |  |\n| Text:\u003Cbr>INPUT()\u003Cbr>Block: INPUT |  |  |  |  | Accepts a value from the user and returns the input value. |\n\nArithmetic Operators and Numeric Procedures  \n\n| Text and Block: | The arithmetic operators +, -, *, and / are used to perform |\n| --- | --- |\n| a + b | arithmetic on a and b. |\n| a-b\u003Cbr>a * b | For example, 17 / 5 evaluates to 3.4. |\n| a / b | The order of operations used in mathematics applies when evaluating expressions. |\n| Text and Block: a MOD b | Evaluates to the remainder when a is divided by b. Assume that a is an integer greater than or equal to 0 and b is an integer greater than 0.\u003Cbr>For example, 17 MOD 5 evaluates to 2.\u003Cbr>The MOD operator has the same precedence asthe * and / operators. |\n| Text: | Generates and returns a random integer from a to b, including |\n| RANDOM(a, b) | a and b. Each result is equally likely to occur. |\n| Block:\u003Cbr>RANDOM a, b\u003Cbr>| For example, RANDOM(1, 3) could return 1, 2, or 3. |\n\nRelational and Boolean Operators  \n\n| Text and Block: a = b\u003Cbr>a ≠ b\u003Cbr>a > b\u003Cbr>a \u003C b\u003Cbr>a ≥ b\u003Cbr>a ≤ b | The relational operators =, ≠, >, \u003C, ≥, and ≤ are used to test the relationship between two variables, expressions, or values. A comparison using relational operators evaluates to a Boolean value.\u003Cbr>For example, a = b evaluates to true if a and b are equal; otherwise it evaluates to false. |\n| --- | --- |\n\nAP Computer Science Principles 1  \n© 2025 College Board  \nInstruction Explanation  \nRelational and Boolean Operators (continued)  \n\n| Text:\u003Cbr>NOT condition\u003Cbr>Block:\u003Cbr>NOT condition\u003Cbr>|  | Evaluates to true if condition is false; otherwise evaluates to false. |  |\n| --- | --- | --- | --- |\n| Text:\u003Cbr>condition1 AND condition2\u003Cbr>Block:\u003Cbr>condition1 AND condition2\u003Cbr>|  | Evaluates to true if both condition1 and condition2 are true; otherwise evaluates to false. |  |\n| Text: |  | Evaluates to true if condition1 is true or if |  |\n| condition1 OR | condition2 | condition2 | is true or if both condition1 and |\n| Block: |  | condition2 | are true; otherwise evaluates to false. |\n| condition1 | OR condition2 |  |  |\n\nSelection  \n\n| Text:\u003Cbr>IF(condition){\u003Cbr>\u003Cblock of statements>}\u003Cbr>Block:\u003Cbr>\u003Cbr>IF condition\u003Cbr>\u003Cbr>block of statements | The code in block of statements is executed if the Boolean expression condition evaluates to true; no action is taken if condition evaluates to false. |\n| --- | --- |\n| Text:\u003Cbr>IF(condition){\u003Cbr>\u003Cfirst block of statements>\u003Cbr>} ELSE {\u003Cbr>\u003Csecond block of statements>}\u003Cbr>Block:\u003Cbr>\u003Cbr>IF condition\u003Cbr>\u003Cbr>first block of statements\u003Cbr>ELSE\u003Cbr>second block of statements | The code in first block of statements is executed if the Boolean expression condition evaluates to true; otherwise the code in second block of statements is executed. |\n\nAP Computer Science Principles 2  \n© 2025 College Board  \nInstruction Explanation  \nIteration  \n| Text:\u003Cbr>REPEAT n TIMES {\u003Cbr>\u003Cblock of statements>}\u003Cbr>Block:\u003Cbr>\u003Cbr>REPEAT n TIMES\u003Cbr>block of statements | The code in block of statements is executed n times. |\n| --- | --- |\n| Text:\u003Cbr>REPEAT UNTIL(condition){\u003Cbr>\u003Cblock of statements>}\u003Cbr>Block:\u003Cbr>\u003Cbr>REPEAT UNTIL condition\u003Cbr>\u003Cbr>block of statements | The code in block of statements is repeated until the Boolean expression condition evaluates to","cbCaiqE1yMTeyAH9","https://ap.wps.com/l/cbCaiqE1yMTeyAH9","pdf",521466,"English","# Instruction Explanation\n## Assignment, Display, and Input\n## Arithmetic Operators and Numeric Procedures\n## Relational and Boolean Operators\n## Selection\n## Iteration\n## List Operations","[{\"question\":\"What does DISPLAY(expression) do in the AP CSA reference sheet?\",\"answer\":\"It displays the value of expression, followed by a space.\"},{\"question\":\"How are arithmetic operations evaluated, including order of operations and MOD?\",\"answer\":\"The order of operations used in mathematics applies when evaluating expressions, and MOD evaluates to the remainder when a is divided by b (with specified integer assumptions).\"},{\"question\":\"What happens when a list index is out of range in list operations?\",\"answer\":\"If a list index is less than 1 or greater than the list length, the program produces an error message and terminates.\"}]","AP Computer Science Principles - Exam Reference Information - Instruction Explanation - List Operations | PDF",1789901274,18]