[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-207541-en":3,"doc-seo-207541-105":30,"detail-sidebar-cat-0-en-105":91},{"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":20,"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},207541,7971461741311,"Ophelia","https://ap-avatar.wpscdn.com/avatar/74000253aff267980c6?x-image-process=image/resize,m_fixed,w_180,h_180&k=1779345379180704826",4,"Exam","GCSE (9–1) Computer Science - J277/02 Computational thinking, algorithms and programming - Question Paper","GCSE (9–1) Computer Science paper J277/02 assesses computational thinking through algorithm design, problem solving and programming concepts. Section A includes selecting programming constructs, completing an incomplete flowchart for odd/even determination, identifying syntax and logic errors, and demonstrating binary search usage with prerequisites. It also covers defensive design for a video-rating program, and completes a Boolean truth table. Questions require clear coding, correct control flow, and understanding of search, sorting, inputs/outputs and logic gates.","Oxford Cambridge and RSA  \nTuesday 21 May 2024 – Afternoon  \nGCSE (9–1) Computer Science  \nJ277/02 Computational thinking, algorithms and programming Time allowed: 1 hour 30 minutes  \nDo not use:  \n• a calculator  \n\n| Please write clearly in black ink. Do not write in the barcodes. |  |  |  |\n| --- | --- | --- | --- |\n| Centre number |  | Candidate number |  |\n| First name(s)  \u003Cbr>Last name   |  |  |  |\n\nINSTRUCTIONS  \n• Use black ink.  \n• Write your answer to each question in the space provided. If you need extra space use the lined pages at the end of this booklet. The question numbers must be clearly shown.  \n• Answer all the questions.  \nINFORMATION  \n• The total mark for this paper is 80.  \n• The marks for each question are shown in brackets [ ] .  \n• This document has 20 pages.  \nADVICE  \n• Read each question carefully before you start your answer.  \n• We advise you to spend approximately 50 minutes on Section A and approximately 40 minutes on Section B.  \n© OCR 2024 [601/8355/X] DC (ST) 342920/6  \nOCR is an exempt Charity  \nTurn over  \n2  \nSECTION A  \nWe advise you to spend approximately 50 minutes on Section A.  \n1 Tick (✓) one box in each row to identify the programming construct where each keyword is used.  \n\n| Keyword | Programming construct |  |\n| --- | --- | --- |\n|  | Selection | Iteration |\n| if |  |  |\n| for |  |  |\n| while |  |  |\n\n[3]  \n2 An algorithm decides if a number is odd or even.  \nAn odd number divided by 2 will give the remainder 1.  \nThe flowchart statements have been written for the algorithm, but the flowchart is incomplete. Complete the flowchart.  \nStart  \nINPUT num  \nif num MOD 2 == 0 OUTPUT \"Odd\"  \nOUTPUT \"Even\"  \nEnd  \n[4]  \n© OCR 2024  \n3  \n3  \n(a) State what is meant by the term syntax error. Give one example of a syntax error in a program. Definition ..........................................................................................................................................  \n..........................................................................................................................................................  \nExample ...........................................................................................................................................  \n..........................................................................................................................................................  \n[2]  \n(b) A student writes an algorithm to input two numbers and add them together to create a total.  \nIf the total is between 10 and 20 inclusive, \"success\" is output.  \nIf the total is not between 10 and 20 inclusive, \"warning\" is output.  \n01 num1 = input(\"Enter a number\")  \n02 num2 = input(\"Enter a number\")  \n03 total = num1 + num1  \n04 if total >= 10 then  \n05 print(\"success\")  \n06 else  \n07 print(\"warning\")  \n08 endif  \nThe algorithm does not work correctly.  \nIdentify the line number of the two logic errors in the algorithm and refine the code to correct each logic error.  \nLine number ..................................................................................................................................... Correction .........................................................................................................................................  \n..........................................................................................................................................................  \nLine number ......................................................................................................................................  \nCorrection .........................................................................................................................................  \n..........................................................................................................................................................  \n[4]  \n© OCR 2024 Turn over  \n4  \n(c)  \n(i) Show how a binary search will be ","cbCainvxa1KyTgYA","https://ap.wps.com/l/cbCainvxa1KyTgYA","pdf",2367307,1,20,"English","en",105,"# Section A\n## Programming constructs and control flow\n## Algorithms: flowcharts, syntax and logic errors\n## Binary search and sorting\n## Inputs, outputs and defensive design\n## Boolean logic: truth tables\n## Logic circuits","[{\"question\":\"What is Section A mainly focused on in this exam paper?\",\"answer\":\"Section A focuses on computational thinking tasks such as identifying programming constructs, completing and correcting algorithms and flowcharts, and applying search, sorting, input/output, defensive design, and Boolean logic concepts.\"},{\"question\":\"How is the odd/even algorithm question structured?\",\"answer\":\"It describes an algorithm using modular arithmetic and provides incomplete flowchart statements; you must complete the missing parts so the program outputs the correct result for odd and even numbers.\"},{\"question\":\"What kinds of mistakes are students asked to identify in the logic error question?\",\"answer\":\"Students are asked to identify two logic errors by line number and then refine the code to correct each issue so the algorithm produces the required outputs for totals between 10 and 20 inclusive.\"}]","GCSE (9–1) Computer Science - J277/02 Computational thinking, algorithms and programming - Question Paper | PDF",1788599943,50,{"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":86,"head_meta":88,"extra_data":90,"updated_unix":28},"gcse-91-computer-science-j27702-computational-thinking-algorithms-and-programming-question-paper","",{"@graph":36,"@context":85},[37,53,68],{"@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/gcse-91-computer-science-j27702-computational-thinking-algorithms-and-programming-question-paper/207541/",{"url":52,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":41,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-09-06","2026-09-05",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What is Section A mainly focused on in this exam paper?","Question",{"text":75,"@type":76},"Section A focuses on computational thinking tasks such as identifying programming constructs, completing and correcting algorithms and flowcharts, and applying search, sorting, input/output, defensive design, and Boolean logic concepts.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How is the odd/even algorithm question structured?",{"text":80,"@type":76},"It describes an algorithm using modular arithmetic and provides incomplete flowchart statements; you must complete the missing parts so the program outputs the correct result for odd and even numbers.",{"name":82,"@type":73,"acceptedAnswer":83},"What kinds of mistakes are students asked to identify in the logic error question?",{"text":84,"@type":76},"Students are asked to identify two logic errors by line number and then refine the code to correct each issue so the algorithm produces the required outputs for totals between 10 and 20 inclusive.","https://schema.org",{"og:url":52,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":52},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,104,109,113,118,123,127,130,134],{"id":20,"doc_module":4,"doc_module_name":46,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":47,"doc_module":4,"doc_module_name":46,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":11,"doc_module":4,"doc_module_name":46,"category_name":12,"show_sort_weight":102,"slug":103},70,"exam",{"id":105,"doc_module":4,"doc_module_name":46,"category_name":106,"show_sort_weight":107,"slug":108},5,"Comic",60,"comic",{"id":110,"doc_module":4,"doc_module_name":46,"category_name":111,"show_sort_weight":29,"slug":112},6,"Technology","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":21,"slug":126},9,"Religion & Spirituality","religion-spirituality",{"id":21,"doc_module":4,"doc_module_name":46,"category_name":128,"show_sort_weight":21,"slug":129},"World Cup","world-cup",{"id":131,"doc_module":4,"doc_module_name":46,"category_name":132,"show_sort_weight":131,"slug":133},10,"Lifestyle","lifestyle",{"id":135,"doc_module":4,"doc_module_name":46,"category_name":136,"show_sort_weight":105,"slug":137},19,"General","general"]