[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-207545-en":3,"doc-seo-207545-105":30,"detail-sidebar-cat-0-en-105":90},{"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},207545,962084928432,"Maya Linwood","https://ap-avatar.wpscdn.com/davatar_155a257f0dc6eb9ab79c44ca47cae57d",4,"Exam","Programming Fundamentals & Data Types - Revision Notes","Programming Fundamentals & Data Types covers core ideas needed to turn algorithms into working code. It explains variables, constants, and assignment, including how values are stored and how data can change during execution. The material then introduces operators and common arithmetic, comparison, and boolean logic, showing practical examples for Python. It also details inputs and outputs, typical devices, and a worked example that calculates cinema ticket cost from user age.","Head to www.savemyexams. com for more awesome resources  \n OCR GCSE Computer Science  \nProgramming Fundamentals & Data Types  \nContents  \n Fundamental Programming Concepts  Programming Constructs  \n Common Arithmetic Operators  \n Common Boolean Operators  Data Types  \nPage 1 of 22  \n© 2015 − 2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers  \nYour notes  \nHead to www.savemyexams. com for more awesome resources  \nFundamental Programming Concepts  \nTaking an algorithm and turning it into code, in any language, requires an understanding of several basic programming concepts such as:  \n Variables  \n Constants  \n Assignment  \n Operators  \n Inputs  \n Outputs  \nVariables, Constants & Assignments What isa variable?  \n A variable is a named memory location that holds data that during the execution of a program, the data can change  \n Variables can store a variety of diyerent types of data such as numbers, text or true/false values  \n To store data in a variable, the process of assignment is used  \nWhat isa constant?  \n A constant is |xed data that during the execution of a program cannot change  \n A constant can store a variety of diyerent types of data, similar to variables  \n Pi is an example of a mathematical |xed value that would typically be stored as a constant  \nWhat is assignment?  \n Assignment is the process of storing data ina variable or constant under a descriptive name  \n Assignment is performed using the ' = ' symbol Assigning variables & constants  \n\n| Concept | OCR exam reference | Python |\n| --- | --- | --- |\n\nPage 2 of 22  \n© 2015 − 2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers  \nYour notes  \nHead to www.savemyexams. com for more awesome resources  \n\n| Variables | x = 3\u003Cbr>name = \"Save My Exams\" | x = 3\u003Cbr>name = \"Save My Exams\" |\n| --- | --- | --- |\n| Constants | const vat = 0.2\u003Cbr>const pi = 3.142 | VAT = 0.2\u003Cbr>PI = 3.142 |\n\nOperators, Inputs & Outputs What isan operator?  \n An operator is asymbol used to instruct a computer to perform aspeci|c operation on one or more values  \n Examples of common operators include:  \n Arithmetic  \n Comparison  \n Boolean (AND, OR and NOT) Arithmetic  \n\n| Operator | OCR exam reference | Python |\n| --- | --- | --- |\n| Addition | + | + |\n| Subtraction | - | - |\n| Multiplication | * | * |\n| Division | / | / |\n| Modulus (remainder after division) | MOD | % |\n| Quotient (whole number division) | DIV | // |\n| Exponentiation (to the power of ) | ^ | ** |\n\nPage 3 of 22  \n© 2015 − 2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers  \nYour notes  \nHead to www.savemyexams. com for more awesome resources  \nComparison  \n\n| Operator | OCR exam reference | Python |\n| --- | --- | --- |\n| Equal to | == | == |\n| Not equal to | != | != |\n| Less than | \u003C | \u003C |\n| Less than or equal to | \u003C= | \u003C= |\n| Greater than | > | > |\n| Greater than or equal to | >= | >= |\n\nExamples  \n\n| Operator | OCR exam reference | Python |\n| --- | --- | --- |\n| Addition | sum = 2 + 2 \\# 4 | sum = 2 + 2 \\# 4 |\n| Multiplication | sum = 3 * 4 \\# 12 | sum = 3 * 4 \\# 12 |\n| Modulus | sum = 10 MOD 3 \\# 1 | sum = 10 % 3 \\# 1 |\n| Quotient | sum = 10 DIV 3 \\# 3 | sum = 10 // 3 \\# 3 |\n| Exponentiation | sum = 2 ^ 2 \\# 4 | sum = 2 ** 2 \\# 4 |\n| Equal to | if 3 == 3 then \\# True | if 3 == 3: \\# True |\n| Not equal to | if 5 != 6 then \\# True | if 5 != 6: \\# True |\n| Greater than or equal to | if 10 >= 2 then \\# True | if 10 >= 2: \\# True |\n\nPage 4 of 22  \n© 2015 − 2024 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers  \nYour notes  \nHead to www.savemyexams. com for more awesome resources  \n\n| AND | number = 10\u003Cbr>if number > 0 and \u003C 20 then \\# True | number = 10\u003Cbr>if number > 0 and number \u003C 20:\u003Cbr>\\# True |\n| --- | --- | --- |\n\nWhat isan input?  \n An input is a value that is read from an input device and then processed by a computer program  \n Typical input devices include:  \n Keyboards-Typing text  \n Mice-Selecting item, clicking buttons  \n Sensors-Reading","cbCaipib0FSTVd71","https://ap.wps.com/l/cbCaipib0FSTVd71","pdf",1495487,1,22,"English","en",105,"# Fundamental Programming Concepts\n## Variables, Constants & Assignments\n## Operators, Inputs & Outputs\n## Worked Example: Cinema Ticket Pricing","[{\"question\":\"What is a variable in programming?\",\"answer\":\"A variable is a named memory location that holds data which can change during program execution. It can store types such as numbers, text, and boolean values.\"},{\"question\":\"How is a constant different from a variable?\",\"answer\":\"A constant stores fixed data that cannot change during the execution of the program. It can still hold different data types, such as a fixed mathematical value.\"},{\"question\":\"What are inputs and outputs in a program?\",\"answer\":\"Inputs are values read from input devices and processed by the program, while outputs are values sent to output devices like monitors, speakers, or printers.\"}]","Programming Fundamentals & Data Types - Revision Notes | PDF",1788599962,55,{"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":85,"head_meta":87,"extra_data":89,"updated_unix":28},"programming-fundamentals-data-types-revision-notes","",{"@graph":36,"@context":84},[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/programming-fundamentals-data-types-revision-notes/207545/",{"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,76,80],{"name":71,"@type":72,"acceptedAnswer":73},"What is a variable in programming?","Question",{"text":74,"@type":75},"A variable is a named memory location that holds data which can change during program execution. It can store types such as numbers, text, and boolean values.","Answer",{"name":77,"@type":72,"acceptedAnswer":78},"How is a constant different from a variable?",{"text":79,"@type":75},"A constant stores fixed data that cannot change during the execution of the program. It can still hold different data types, such as a fixed mathematical value.",{"name":81,"@type":72,"acceptedAnswer":82},"What are inputs and outputs in a program?",{"text":83,"@type":75},"Inputs are values read from input devices and processed by the program, while outputs are values sent to output devices like monitors, speakers, or printers.","https://schema.org",{"og:url":52,"og:type":86,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":88,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":91},[92,96,100,103,108,113,118,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":93,"show_sort_weight":94,"slug":95},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":97,"show_sort_weight":98,"slug":99},"Literature",80,"literature",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":101,"slug":102},70,"exam",{"id":104,"doc_module":4,"doc_module_name":46,"category_name":105,"show_sort_weight":106,"slug":107},5,"Comic",60,"comic",{"id":109,"doc_module":4,"doc_module_name":46,"category_name":110,"show_sort_weight":111,"slug":112},6,"Technology",50,"technology",{"id":114,"doc_module":4,"doc_module_name":46,"category_name":115,"show_sort_weight":116,"slug":117},7,"Healthcare",40,"healthcare",{"id":119,"doc_module":4,"doc_module_name":46,"category_name":120,"show_sort_weight":121,"slug":122},8,"Research & Report",30,"research-report",{"id":124,"doc_module":4,"doc_module_name":46,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":46,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":46,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":46,"category_name":137,"show_sort_weight":104,"slug":138},19,"General","general"]