トピック / GCSE / Computer Science / Programming Testing, debugging and error types 遊んで学ぼう
問題に答えてエネルギーを集めたら、釣りや探検を楽しもう。アカウント不要。
教育者の方へ: Testing, debugging and error types(Computer Science、Programming)向けのすぐ使えるレッスンスライド, 復習ノート — レッスンで使うか、学習者がライブゲームとして遊ぶインタラクティブなクラス活動としてトピックを実施できます。
レッスンノート Types of error A syntax error violates language grammar, such as a missing required bracket; a compiler or interpreter reports it before executing the affected code. A logic error produces unintended behaviour despite syntactically valid code. A runtime error arises during execution, such as a rejected out-of-range access. Errors can be handled; they do not invariably crash the whole application. Program error types Testing Test data types : normal (valid), boundary (at the edge of valid ranges) and erroneous (invalid). For age 18-65: normal 30; boundary 18, 65 (and 17, 66 as invalid boundaries); erroneous "abc".A test plan lists inputs, expected outputs and actual outputs. Iterative testing : testing during development. Final/terminal testing : at the end against the specification.Test data categories Debugging tools Trace tables , breakpoints , stepping through code , watch windows , print statements ; IDE error messages .Debugging tools Good practice Write comments , meaningful names , modular code; test each module ; fix one error at a time. Defensive design Anticipate misuse and handle errors gracefully. スライド Sign up free to view the lesson slides
Step through every slide for this topic — plus flashcards and revision notes — with a free account.
練習問題 無料プレビュー — 33問中8問。すべて見るには登録を。 A an error in a programB a featureC a variableD a loopA finding and fixing errorsB writing codeC compilingD running3. A program runs to completion but calculates the wrong result because its algorithm is incorrect. What type of error is this?
Easy A logic errorB syntax errorC runtime errorD hardware error4. Which error is caused by a missing bracket?
Easy A syntax errorB logic errorC runtime errorD none5. What is erroneous test data?
Easy A invalid data that should be rejectedB valid dataC boundary dataD no data6. For valid ages 18 to 65, which is boundary data?
Easy 7. For valid ages 18 to 65, which is normal data?
Easy 8. What does a breakpoint do?
Easy A pauses the program at a chosen lineB ends the programC adds a loopD deletes codeもっと問題 9. What does a trace table show?
Easy A variable values step by stepB error messagesC file sizesD network traffic10. What is a test plan?
Easy A a table of tests, expected results and actual resultsB a list of bugsC a flowchartD a loop11. What is iterative testing?
Easy A testing throughout developmentB testing at the very end onlyC testing hardwareD no testing12. What type of error is using×instead of + in a sum?
Medium A logic errorB syntax errorC runtime errorD none13. In a language that checks array bounds at runtime, what happens when an out-of-range index is accessed?
Medium A runtime errorB syntax errorC logic errorD none14. An integer input range is 1–10 inclusive. Which group tests both endpoints and the values immediately outside them?
Medium A 0, 1, 10, 11B 5 onlyC 1000 onlyD none15. Why test boundary data?
Medium A many errors occur at limitsB they are easyC they are rareD they are identical to normal16. What is final testing?
Medium A testing the whole program against requirements at the endB testing one lineC testing hardwareD writing code17. What does stepping through code do?
Medium A runs the program one line at a timeB deletes linesC compilesD compresses18. A program sorts [3,1,2] but outputs [1,3,2]. What error type is this?
Medium A logic errorB syntax errorC runtime errorD hardware error19. What is a good first step when a program crashes?
Medium A read the error message and find the lineB delete the programC ignore itD re-install20. Why use comments in code?
Medium A to explain code and aid maintenanceB to slow the programC to hide errorsD to add data21. Why test each module separately?
Medium A easier to find where errors areB to avoid testingC to slow workD no reason22. What is 'expected output'?
Easy A the result the test should produceB the actual resultC an errorD a loop23. What is 'actual output'?
Easy A what the program really producesB what is expectedC the planD the data24. What is a watch window?
Medium A a tool showing variable values during runningB a hardware partC a loopD a flowchart25. What should you do after fixing a bug?
Medium A retest to check it works and did not break anythingB ignoreC delete testsD stop26. A syntax error breaks the rules of the language.
Easy True or false?
27. A logic error produces wrong output.
Easy True or false?
28. A logic error stops the program compiling.
Easy True or false?
29. Boundary data tests the limits of an input range.
Easy True or false?
30. Testing is only done once at the end.
Medium True or false?
31. Which are types of test data?
Medium A normalB boundaryC erroneousD random sleepE compile32. Which are debugging tools?
Medium A trace tableB breakpointC single steppingD watch windowE monitor brightness control33. Explain how you would choose test data for a program that accepts marks from 0 to 100.
Medium Unlock all 33 questions & more 無料アカウントを作って、このトピックのすべての問題・スライド・フラッシュカード・復習ノートを見よう。
過去問 このトピックの過去問練習は近日公開。