GCSE Computer Science Mini NEA Workbook
3930650-533400Name: ________________________MTG: _________ EOYT: ______Marks: _________Grade:______Name: ________________________MTG: _________ EOYT: ______Marks: _________Grade:______IntroductionWhat is the NEA?The NEA stands for non-examined assessment and is a project you undertake during your GCSE studies. You will be given a programming task that you will need to complete and have 20 hours to do it. It’s like a Controlled Assessment – it must be your own work – but the current rules state you can use books and the internet, and the work will not count towards your grade. However you must do it, and it will be marked by your teacher. The project is also an excellent practice for the material that will be tested in the Paper2 Exam.37909506985AnalysisDecompositionDesignFlowcharts/pseudocodeImplementationPython programsTest PlanTesting, refining and evaluationTest ResultsImprovementsEvaluation00AnalysisDecompositionDesignFlowcharts/pseudocodeImplementationPython programsTest PlanTesting, refining and evaluationTest ResultsImprovementsEvaluationThese tasks will prepare you to do well in the NEA which will happen in the early part of Year 11.What do I need to do?You will be given a scenario and a programming problem. For example, you might have to write the programs to analyse weather data or run the judging in a dance competition. You will need all your problem-solving and programming skills. You need to analyse the problem and break it down (decomposition), produce a design including flowcharts and pseudocode, code and debug the programs, test the program and write a test report, and evaluate your project. All your code and documents will be marked by your teacher.Mini-NEAsAnalysisDesignImplementationTesting, refining and evaluationThis document contains several small projects which you will complete as practice for the full NEA. In doing so you will also improve skills needed for the exam papers in the summer of Year 11. In particular, this project improves Edexcel Topics 1 (Problem Solving) and 2 (Programming).Task – Place the tasks in the correct project stageIn the table on the right, which stage of the project might you do these things? Write them in now draw a flowchartwrite Python codedecompose the problemtest the programwrite an introduction write pseudocodeimprove the codewrite a test planNow turn over and read the worked example…Worked ExampleA taxi company wants a program to calculate taxi fares. The program will first input the kilometres driven and the hour of journey e.g. 5pm would be 17, 1am would be 01. The fare is then calculated from a ?2.00 booking fee plus 50p per kilometre. We add a ?5 surcharge on top if the journey time is between midnight and 6am. The program should output the calculated fare.AnalysisLet's break the problem down into steps. Remember input, process, output, data (iPod). I: Look for inputs: "kilometres driven and time". P: Look for a process: "fare is calculated". O: What output is needed? "The program should output the calculated fare". D: Now consider what data we need. Obviously our two inputs. But we are calculating the fare, so that needs to be stored too. Write them out like this:InputProcessOutputDatakmtimecalculate farefarekilometrestimefareDesign351409026733500Now we can think about how the algorithm will flow. 1. Input the two values.2. Calculate the basic fare. We add ?2 to 50p times km. Turning this into an expression in pounds, we get: fare = 2 + 0.5 * km.3. Handle surcharge. The question says "if the journey time is between midnight and 6am". So, if the time value is 6 or less, we add ?5 to the variable fare.4. Finally we output the result, now stored in the fare variable. Here is the flowchart And here is the Pseudocode:time=int(input())km = int(input())fare = 2 + 0.5*kmif time <= 6 then fare = fare + 5end ifprint(fare)* I recommend draw.io to create flowcharts, then paste into Word.Implementation3495675106045time = int(input("time?"))km = int(input("km?"))fare = 2 + 0.5*kmif time <= 6: fare = fare + 5print(fare)0time = int(input("time?"))km = int(input("km?"))fare = 2 + 0.5*kmif time <= 6: fare = fare + 5print(fare)Now we need to write the Python code. If your design is good, the coding should be simple. Use the pseudocode and translate to Python a line at a time. Remember Python doesn't use END statements, and indentation is important.If you didn't write the pseudocode, just follow the flowchart and code at least one line for every shape. Use the Python cheat sheet or online resources below, nobody writes Python from memory!wiki.coding-in-python/beginning-python/ or pythondictionary.code-it.co.uk/ TestingNow we need to test the code. Read the question again! Consider some inputs and predict the output. For example, a journey at 3pm of 2 miles should result in a fare of 2 + (0.5 * 2) = 4 Create a test table of inputs and predicted outputs, run the program and mark them successful or failed. Include some boundary data e.g. exactly midnight or 6am:Test NoPurpose of testTest dataExpected resultActual resultAction Needed1Test short daytime journeytime = 15km = 244None2Test long daytime journeytime = 11km = 159.59.5None3Test short night time journeytime = 3km = 299None4Test long night time journeytime = 2km = 1514.514.5None5Test boundary of midnighttime = 0km = 38.58.5None6Test boundary of 6amtime = 6km = 17.57.5None*Note that if any of the test fails, i.e. the Actual Result does not match the Expected Result, you need to say in the last column what you will do about it (e.g. fix the code!).SummaryThat's it! In the real NEA you will add an Evaluation, an Introduction, and the project will be bigger and require breaking into sub-tasks, but otherwise the process is the same. Now complete these mini-NEA tasks. Each one should take between 1 and 3 hours.Mini-NEA Task 1: Euro and Dollar Conversions A financial adviser needs a program to convert British pound sterling values into other currencies. The program will input the value in pounds, then ask which target currency is required, the required inputs are "USD" for US Dollars, "EUR" for Euros. Other values should display an error. The program will then perform the conversion and display the result. It should use these rates: EUR 1.18 = GBP 1.00 and USD 1.26 = GBP 1.00.AnalysisInputProcessOutputDatapoundstargetcalculate amount in target currencycurrency poundstargetcurrencyDesign320040040005write the pseudocode herepounds=int(input("pounds?"))target=input("target currency?")if target = "EUR" thencurrency = pounds * 1.18print(currency)elseif target = "USD" thencurrency = pounds * 1.26print(currency)elseprint("Error!")endif00write the pseudocode herepounds=int(input("pounds?"))target=input("target currency?")if target = "EUR" thencurrency = pounds * 1.18print(currency)elseif target = "USD" thencurrency = pounds * 1.26print(currency)elseprint("Error!")endifdraw the flowchart hereImplementation44069004445WWWEBI00WWWEBICode the Python, run and debug it, then write the working code here:pounds=int(input(“pounds?”))target=input("target currency?")if target == "EUR":currency = pounds * 1.18print(currency)elif target == "USD":currency = pounds * 1.26print(currency)else:print("Error!")TestingComplete the test planTest NoPurpose of testTest dataExpected resultActual resultAction Needed12345678910Mini-NEA Task 2: Username Generator A new application requires usernames to be automatically generated. It will repeatedly input a first name and last name, then generate a username consisting of the first two letters of the first name, and the first three letters of the last name, plus a random number between 10 and 99. For example, Suzy Watkins might get the username SuWat45, while Tom Franks might get ToFra12. The program should then ask if another name is needed, and if so it should repeat the process for the next person. If the user enters "N" the program should end. NB use "string slicing" in Python e.g. firstName[0:1] returns the first two characters.AnalysisInputProcessOutputDatafirstnamelastnameanother create usernameusernamerandomnumfirstnamelastnameusernameanotherDesign303530038735write the pseudocode hereagain = "Y"while again = "Y" dofirstname=input("First name?")lastname=input("Last name?")rand=Random(10,99)username=firstname[0:2] + lastname[0:3] + str(rand)print(username)again=input("Again ?")end while00write the pseudocode hereagain = "Y"while again = "Y" dofirstname=input("First name?")lastname=input("Last name?")rand=Random(10,99)username=firstname[0:2] + lastname[0:3] + str(rand)print(username)again=input("Again ?")end whiledraw the flowchart hereImplementationright50165WWWEBI00WWWEBICode the Python, run and debug it, then write the working code here: again = "Y"while again == "Y":firstname=input("First name?")lastname=input("Last name?")rand=random.randint(10,99)username=firstname[0:1] + lastname[0:2] + str(rand)print(username)again=input("Again ?")TestingComplete the test planTest NoPurpose of testTest dataExpected resultActual resultAction Needed1Normal nameBobSmithBoSmixxBoSmi74No2Normal NameJaved SinghJaSinyyJaSin77No3Short namesA XAXzz4Numeric name12345 &%$ 12&%$aa5Blank NameNothing nothingnn6Test loop condition 1Again = “y”Go BackfinishedChange code so it accepts lower or upper case7Again = “Y”Go back8Again = “yes”finished9Again=”N”Finished 10Mini-NEA Task 3: Computer BenchmarkA technology website regularly rates the performance of new computers out of 100. A computer gets a benchmark score out of 25 for CPU speed, where 3GHz or above gets 25 and lower speeds get a fraction of 25; another score out of 25 for Number of Cores where 8 cores gets 25; another score out of 25 for Cache size where 32MB or above gets 25, and a score out of 25 for RAM where 8GB or above gets 25. The total benchmark score out of 100 is then calculated by adding these together. eg. a PC with 2GHz, 4 cores, 8MB cache and 4GB RAM scores 2/3*25 + 4/8*25 + 8/32*25 + 4/8 * 25 = 47.9.There are five new PCs to review each month. The program should repeatedly input the PC model name and the four performance values, calculate the benchmark score, then store the model name and score in an array. Then find the best score and output that with the message "Top Score:" and the model name.AnalysisInputProcessOutputDataDesigndraw the flowchart here47371003765550WWWEBI00WWWEBI-95250write the pseudocode here00write the pseudocode hereImplementationCode the Python, run and debug it, then write the working code here: python cont…TestingComplete the test planTest NoPurpose of testTest dataExpected resultActual resultAction Needed123456789101112Mini-NEA Task 4: Drinks MachineA free drinks machine provides 20 different drinks. It contains an embedded computer, and a small keypad with keys 0-9, Submit and Cancel. It has a small LCD display, which can display messages to the user. To get a drink the user selects it by typing in the relevant number (1-20). If they type in the wrong number, they can cancel and enter a new number. When they are happy with their choice they press the submit button. If the selection is valid (1-20) and the drink available, the machine will dispense the drink. If not, the machine should display an error message. The program should run repeatedly.AnalysisInputProcessOutputDataDesigndraw the flowchart here46482004001770WWWEBI00WWWEBI-95250write the pseudocode here00write the pseudocode hereImplementationCode the Python, run and debug it, then write the working code here: python cont…TestingComplete the test planTest NoPurpose of testTest dataExpected resultActual resultAction Needed123456789101112Additional ChallengesNow that you have completed these problems, you can get many more problems to solve at these websites: Choose one of these problems and complete the NEA stages above. Then go back and choose another one. Alternatively, look around at digital products, programs and apps you are familiar with. Can you work out the algorithm behind it? For example, pedestrian crossing lights, a coffee machine, the apps on your smartphone. Write a description of the algorithm in English, then make it an NEA problem, and challenge yourself (and others) to solve it!More information on the NEA here (Edexcel)bit.ly/edxcomp right287020WWWEBI00WWWEBI ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
Related searches
- igcse computer science workbook answer
- gcse combined science past papers
- gcse combined science pdf
- gcse computer science revision
- computer science igcse workbook pdf
- computer science gcse past papers
- gcse computer science pdf
- computer science gcse journal
- igcse computer science workbook answers
- edexcel gcse computer science
- aqa gcse computer science
- cambridge igcse computer science workbook pdf