!
Testing data
Answer these questions on this worksheet. Once you have finished answering them, press the Save button and then upload it to Google Classroom.
- Why does a program need to be tested?
- Why should you only test with a representative set of data and not every possible piece of data?
- Name the three different types of test data and describe them.
- What should you create before testing a program?
- What type of test data should a program reject?
- What type of test data should a program accept?
- What does creating a test data table help the developer do?
- A program has been written to take in 5 numbers.
- Give an example of each type of test data for this program
- If a non-numeric piece of data was entered into the program to test it, what type of test data would this be?
Errors
- What error is caused by a mistake in code?
- Describe this type of error
- Within the context of Python, what could cause this type of error?
- A program is written as shown below:
Python
if x > 10 and x < 5: print("Success")
- What is wrong with this program?
- What type of error is shown here?
- State why this error has occurred but not shown up when the program was written but only when it run?
- When do execution errors get encountered in a program?
- Name two types of execution error
Test your own program
Pick out any of your programs that you have made, for example, guess the number. Create a test table for this program.