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 सवाल। सभी देखने के लिए साइन अप करें।
1.What is a bug?
Easy- Aan error in a program
- Ba feature
- Ca variable
- Da loop
2.What is debugging?
Easy- Afinding and fixing errors
- Bwriting code
- Ccompiling
- Drunning
3.A program runs to completion but calculates the wrong result because its algorithm is incorrect. What type of error is this?
Easy- Alogic error
- Bsyntax error
- Cruntime error
- Dhardware error
4.Which error is caused by a missing bracket?
Easy- Asyntax error
- Blogic error
- Cruntime error
- Dnone
5.What is erroneous test data?
Easy- Ainvalid data that should be rejected
- Bvalid data
- Cboundary data
- Dno data
6.For valid ages 18 to 65, which is boundary data?
Easy- A18
- B30
- C"abc"
- D100
7.For valid ages 18 to 65, which is normal data?
Easy- A30
- B17
- C66
- D"abc"
8.What does a breakpoint do?
Easy- Apauses the program at a chosen line
- Bends the program
- Cadds a loop
- Ddeletes code
Unlock all 33 questions & more
इस टॉपिक के हर सवाल, स्लाइड्स, फ्लैशकार्ड और रिवीज़न नोट्स देखने के लिए फ्री अकाउंट बनाएं।
पास्ट पेपर
इस टॉपिक के लिए पास्ट-पेपर प्रैक्टिस जल्द आ रही है।
जल्द आ रहा है
