[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-208287-en":3,"doc-seo-208287-105":30,"detail-sidebar-cat-0-en-105":82},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":4,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":27,"seo_description":14,"update_tm":28,"read_time":29},208287,962084925636,"Sophia Brooks","https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d",4,"Exam","2.2 - Programming fundamentals - Advanced notes","Advanced notes for Computer Science GCSE cover programming fundamentals with clear core concepts and worked pseudocode-style examples. Topics include core programming statements such as variable and constant declarations, assignment, input, and output, then essential algorithm constructs: sequence, selection, and iteration. The notes also explain arithmetic operations with standard operators, comparison operations yielding True/False, and boolean logic using NOT, AND, and OR. Finally, it introduces data types, why they matter, casting, and key string and file-handling techniques.","OCR Computer Science GCSE  \n# 2.2 – Programming fundamentals\n\nAdvanced Notes  \n2.2.1 Programming fundamentals  \nCore Programming Statements  \n\n| Statements   | Description   | Examples (pseudocode)   |\n| --- | --- | --- |\n| VariableDeclaration   | Creates a variable to store data.   | Example:  \u003Cbr>name = \"Alex\"   |\n| ConstantDeclaration   | A value that does not changewhile the program runs. Oftengiven fully uppercase identifiers.   | Example:  \u003Cbr>PI = 3.14   |\n| Assignment   | Setting or updating a value in avariable.   | Example:  \u003Cbr>score = score + 10   |\n| Input   | Receiving data from the user.   | Example:  \u003Cbr>name = input(“Enter yourname”)   |\n| Output   | Displaying data or information tothe user.   | Example:  \u003Cbr>output(“Hello World”)   |\n\nInput and output statements may vary depending on if your code is written in program code(e.g. Python) or pseudocode. For example, output in Python would be done with‘print()‘,whereas in pseudocode itis done with‘output()‘ .  \nProgramming Constructs  \nThere are three constructs used in algorithms, which help to make them structured, easy tounderstand, and control the flow of the program:  \n1. Sequence – instructions executed in order  \n2. Selection – decisions ( IF, ELSE)  \n3. Iteration – repetition (WHILE, FOR)  \nWhat Are Arithmetic Operations?  \nArithmetic operations are the basic mathematical calculations that can be performed in aprogramming language. These are essential for processing numerical data in algorithms andprograms.  \nStandard Arithmetic Operators  \n\n| Operation   | Symbol   | Example   | Result   |\n| --- | --- | --- | --- |\n| Addition   | +   | 3 + 2   | 5   |\n| Subtraction   | -   | 7 - 4   | 3   |\n| Multiplication   | *   | 5 * 3   | 15   |\n| Real Division   | /   | 10 / 4   | 2.5   |\n| Modulus (MOD)   | %   | 5 % 2   | 1   |\n| Quotient (DIV)   | //   | 8 // 3   | 2   |\n| Exponentiation   | ^   | 4^2   | 16   |\n\nModulus returns the remainder of a division, for example, 7 % 4 would return 3.  \nQuotient returns the largest integer from a division result, for example, 11 // 2 would return 5.Modulus is useful as it can be used to identify if a number is even or odd, for example:  \n- 12 % 2 = 0 (even)  \n- 13 % 2 = 1 (odd)  \nAn odd number modulus 2 will always have a remainder of 1, whilst an even number has noremainder.  \nModulus and quotient division can be used to return both the integer and decimal partsof anumber after division. The full result can be obtained by adding the integer and decimal,  \nwhich is formed by dividing the remainder from the modulus division by the divisor.  \nWhat Are Comparison Operations?  \nComparison operations are used to compare different items of data, and either return Trueor False.  \nStandard Comparison Operators  \n\n| Operation   | Symbol   | Example   | Result   |\n| --- | --- | --- | --- |\n| Equal to   | ==   | 5 == 5   | True   |\n| Not equal to   | !=   | 3 != 4   | True   |\n| Less than   | \u003C   | 2 \u003C 5   | True   |\n| Greater than   | >   | 6 > 7   | False   |\n| Less than or equal to   | \u003C=   | 5 \u003C= 5   | True   |\n| Greater than or equal to   | >=   | 7 >= 10   | False   |\n\nWhat Are Boolean Operations?  \nBoolean operations are logical operators that work with Boolean values (True or False) .They are used in conditions to control the flow of programs.  \nBoolean Operators  \n\n| Operator   | Description   | Example   | Result   |\n| --- | --- | --- | --- |\n| NOT   | Reverses the Boolean value.   | NOT True   | False   |\n| AND   | Returns True if both input conditions aretrue.   | True ANDTrue   | True   |\n| OR   | Returns True if either input condition is true.   | True ORFalse   | True   |\n\nBoolean operators can be combined in complex logic, such as:  \nif age > 18 AND height >= 155:  \nallowEntry  \n2.2.2 Data types  \nWhat Are Data Types?  \nIn programming, a data type defines the kind of data a variable or constant can hold. It tellsthe program howthedata will be stored, processed, and displayed - including whichoperations can be perfor","cbCairluuIs8TnWT","https://ap.wps.com/l/cbCairluuIs8TnWT","pdf",1427752,1,13,"English","en",105,"# 2.2 – Programming fundamentals\n## 2.2.1 Programming fundamentals\n## Core Programming Statements\n## Programming Constructs\n## What Are Arithmetic Operations?\n## What Are Comparison Operations?\n## What Are Boolean Operations?\n## 2.2.2 Data types\n## What Are Data Types?\n## Why Data Types Matter\n## Casting Data Types\n## 2.2.3 Additional programming techniques\n## What Is String Manipulation?\n## What Is File Handling?","[{\"question\":\"How do arithmetic, comparison, and boolean operations differ in programming?\",\"answer\":\"Arithmetic operators perform calculations on numbers, comparison operators evaluate conditions and return True/False, and boolean operators combine logical conditions to control program flow. Arithmetic includes +, -, *, /, MOD, DIV, and exponentiation (^).\"}]","2.2 - Programming fundamentals - Advanced notes | PDF",1788603368,33,{"code":4,"msg":31,"data":32},"ok",{"site_id":24,"language":23,"slug":33,"title":13,"keywords":34,"description":14,"schema_data":35,"social_meta":77,"head_meta":79,"extra_data":81,"updated_unix":28},"22-programming-fundamentals-advanced-notes","",{"@graph":36,"@context":76},[37,53,67],{"@type":38,"itemListElement":39},"BreadcrumbList",[40,44,48,51],{"item":41,"name":42,"@type":43,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":45,"name":46,"@type":43,"position":47},"https://docshare.wps.com/document/","Document",2,{"item":49,"name":12,"@type":43,"position":50},"https://docshare.wps.com/document/exam/",3,{"item":52,"name":13,"@type":43,"position":11},"https://docshare.wps.com/document/22-programming-fundamentals-advanced-notes/208287/",{"url":52,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":61,"encodingFormat":60,"isAccessibleForFree":62,"interactionStatistic":63},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-09-05",true,{"@type":64,"interactionType":65,"userInteractionCount":4},"InteractionCounter",{"@type":66},"ViewAction",{"@type":68,"mainEntity":69},"FAQPage",[70],{"name":71,"@type":72,"acceptedAnswer":73},"How do arithmetic, comparison, and boolean operations differ in programming?","Question",{"text":74,"@type":75},"Arithmetic operators perform calculations on numbers, comparison operators evaluate conditions and return True/False, and boolean operators combine logical conditions to control program flow. Arithmetic includes +, -, *, /, MOD, DIV, and exponentiation (^).","Answer","https://schema.org",{"og:url":52,"og:type":78,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":80,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":83},[84,88,92,95,100,105,110,115,120,123,127],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":46,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":46,"category_name":102,"show_sort_weight":103,"slug":104},6,"Technology",50,"technology",{"id":106,"doc_module":4,"doc_module_name":46,"category_name":107,"show_sort_weight":108,"slug":109},7,"Healthcare",40,"healthcare",{"id":111,"doc_module":4,"doc_module_name":46,"category_name":112,"show_sort_weight":113,"slug":114},8,"Research & Report",30,"research-report",{"id":116,"doc_module":4,"doc_module_name":46,"category_name":117,"show_sort_weight":118,"slug":119},9,"Religion & Spirituality",20,"religion-spirituality",{"id":118,"doc_module":4,"doc_module_name":46,"category_name":121,"show_sort_weight":118,"slug":122},"World Cup","world-cup",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":124,"slug":126},10,"Lifestyle","lifestyle",{"id":128,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":96,"slug":130},19,"General","general"]