[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-311479-105":59,"doc-detail-311479-en":123},{"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":116,"head_meta":118,"extra_data":120,"updated_unix":122},105,"en","the-ap-computer-science-principles-cheat-sheet","The AP Computer Science Principles Cheat Sheet","","AP Computer Science Principles study cheat sheet covering key learning objectives across the CRD and AAP frameworks, data representations, and common programming patterns. It summarizes program design workflow, iterative development, testing and debugging strategies, and distinctions between purpose and function. It also explains conditionals and loops, list operations, procedures and abstraction, and search algorithms. Additional sections review binary/number systems, overflow and roundoff, and data compression with lossless vs. lossy tradeoffs, plus guidance for extracting information from data.",{"@graph":69,"@context":115},[70,84,106],{"@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/the-ap-computer-science-principles-cheat-sheet/311479/",{"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/the-ap-computer-science-principles-cheat-sheet/311479.png","ImageObject",300,407,{"name":92,"@type":93},"Stanley","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-10-29","2026-09-20",true,{"@type":102,"interactionType":103,"userInteractionCount":105},"InteractionCounter",{"@type":104},"ViewAction",11,{"@type":107,"mainEntity":108},"FAQPage",[109],{"name":110,"@type":111,"acceptedAnswer":112},"When should you use linear search versus binary search?","Question",{"text":113,"@type":114},"Use linear search for any list because it checks items one by one, taking O(n) time. Use binary search only when the list is sorted, reducing the worst-case time to O(log n).","Answer","https://schema.org",{"og:url":83,"og:type":117,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":119,"canonical":83},"index,follow",{"doc_id":121,"site_id":62},311479,1790223656,{"code":4,"msg":5,"data":124},{"doc_id":121,"user_id":125,"nickname":92,"user_avatar":126,"doc_module":4,"category_id":19,"category_name":20,"doc_title":65,"doc_description":67,"doc_content":127,"file_id":128,"file_url":129,"file_type":130,"file_size":131,"view_count":105,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":8,"language":132,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":133,"faqs":134,"seo_title":135,"seo_description":67,"update_tm":136,"read_time":81,"preview_page_count":4},2336477405376,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","[The AP Computer Science Principles Cheat Sheet](The AP Computer Science Principles Cheat Sheet www.albert.io)[ www.albert.io](The AP Computer Science Principles Cheat Sheet www.albert.io)  \n\n| Creative Development (CRD) 10–13% |\n| --- |\n| Program Design |\n| Collaboration: pair programming, code reviews, online tools → fewer bugs, diverse perspectives.\u003Cbr>Incremental dev: design → code → test → reﬁne. Break big problems into smaller sub-problems.\u003Cbr>Program docs: comments explain purpose, not syntax. Help others read code.\u003Cbr>Development Process |\n| Iterative: plan → prototype → test → feedback → revise. Not linear — revisit steps as needed.\u003Cbr>Testing: use deﬁned inputs w/ known outputs. Edge cases = boundary values, empty inputs.\u003Cbr>Debugging: add print/display stmts to trace vars. Test small sections independently.\u003Cbr>Program Requirements |\n| Input → processing → output. Programs accept input from user, ﬁle, sensor, or other program.\u003Cbr>Speciﬁcations: what program should do. Requirements: constraints it must meet. |\n| ✓ Create PT: clearly describe your program's purpose, function, and how it manages complexity. |\n| Create PT Essentials |\n| Written responses: 1) describe purpose & function of program, 2) describe algorithm & abstraction.\u003Cbr>Program must: take input, use a list, use a studentdeveloped procedure w/ parameter.\u003Cbr>Video: show running program w/ input → output. ≤1 min,≤30 MB. |\n| ⚠ Purpose ≠ function. Purpose = real-world problem solved. Function = what code does (input/output) . |\n| AAP: Conditionals & Iteration (30–35%) |\n| Conditionals (Selection) |\n| IF(cond) { block } — runs block only when cond = true.\u003Cbr>IF/ELSE: exactly one branch runs. Nested IFs: IF inside IF for multi-way decisions.\u003Cbr>IF/ELSE IF/ELSE: checks top→down, runs 1st true branch. Order matters!\u003Cbr>Equivalent: IF(a AND b) = nested IF(a){IF(b)} . IF(a OR b) = two separate IFs. |\n| ⚠ Nested IF vs. sequential IF: nested = only inner runs if both true. Sequential = both can run. |\n| Iteration (Loops) |\n| REPEAT n TIMES: runs block exactly n times. Use when count is known.\u003Cbr>REPEAT UNTIL(cond): runs until cond = true. Checks AFTER each iteration.\u003Cbr>Inﬁnite loop: cond never true → program hangs. Ensure loop var changes toward exit. |\n| Loop Type When to Use Runs |\n| REPEAT n Known count Exactly n |\n| REPEAT UNTIL Unknown count Until cond true |\n| FOR EACH All list items Once per item |\n| Common Patterns |\n| Filter: loop thru list → IF(condition) → add to new list or count.\u003Cbr>Search: loop thru list → IF(item = target) → return/ﬂag found.\u003Cbr>Accumulator: init var (sum←0), loop, update each pass (sum←sum+item) . |\n| ✓ MC: trace loops by making a table of variable values per iteration. |\n| ⚠ Off-by-one: REPEAT n TIMES runs n times (not n+1 or |\n\n\n| Data: Binary & Number Systems (DAT) 17–22% |\n| --- |\n| Number Systems |\n| Binary (base 2) : digits 0–1. Each bit = power of 2. Rightmost = 2⁰ = 1.\u003Cbr>Bin→dec: multiply each bit × place value, sum. 1011₂ = 8+0+2+1 = 11.\u003Cbr>Dec→bin: divide by 2 repeatedly, track remainders bottom→top. |\n| Bits Max Value \\# of Values |\n| 4 15 16 |\n| 8 (byte) 255 256 |\n| n 2ⁿ − 1 2ⁿ |\n| Overﬂow & Roundoff |\n| Overﬂow: result exceeds max \\# of bits → error. e.g. 8-bit: 255+1 → overﬂow.\u003Cbr>Roundoff: real \\#s stored w/ ﬁnite bits → approx. 1/3 ≠ 0.333… in binary. |\n| ⚠ Roundoff errors accumulate —comparing ﬂoats w/ == can fail. Use tolerance ranges. |\n| Data Representation |\n| Everything is bits: text (ASCII/Unicode), images (RGB pixels), sound (samples), video (frames) .\u003Cbr>Analog→digital: sampling at intervals. Higher sample rate → better quality, more storage.\u003Cbr>Metadata: data about data (e.g. resolution, ﬁle size, date, author) . |\n| Data Type Encoding |\n| Text ASCII (7-bit) / Unicode |\n| Color RGB: 3 bytes (0–255 each) |\n| Sound Samples at intervals |\n| Image Grid of pixel values |\n| ✓ MC tip: n bits → 2ⁿ values. Need X values? Use |\n\n\n| AAP: Lists, Procedures & Algorithms |\n| --- |\n| Lists (Arrays) |\n| List = ordered coll","cbCaipHSVyAhrLX2","https://ap.wps.com/l/cbCaipHSVyAhrLX2","pdf",195230,"English","# Creative Development (CRD)\n## Program Design\n## Development Process\n## Testing and Debugging\n## Program Requirements and Create PT\n# AAP: Conditionals & Iteration\n## Conditionals (Selection)\n## Iteration (Loops)\n## Common Patterns\n# AAP: Lists, Procedures & Algorithms\n## Lists (Arrays)\n## Procedures (Functions)\n## Algorithms & Search\n## Efficiency & Limits\n# Data: Binary & Number Systems (DAT)\n## Number Systems\n## Overﬂow & Roundoff\n## Data Representation\n## Data Type Encoding\n# Data: Compression & Extraction (DAT)\n## Data Compression\n## Extracting Info from Data","[{\"question\":\"When should you use linear search versus binary search?\",\"answer\":\"Use linear search for any list because it checks items one by one, taking O(n) time. Use binary search only when the list is sorted, reducing the worst-case time to O(log n).\"}]","The AP Computer Science Principles Cheat Sheet | PDF",1789894344]