Max = 0 FOR i <- 0 to 10 INPUT Number IF Number > Max THEN Max <- Number
END IF Next i PRINT Max
Read the following Python code:
Type | Description | Example* |
---|---|---|
Normal | Valid data that the program is expected to accept it | |
Abnormal/ Erroneous |
Data that the program should reject it. If handled incorrectly sometimes may break the system | |
Extreme | Valid data, but the data is at the boundary of normal and abnormal |
*Assume we have a program that collects 3 exam scores and calculate the average
Test Data | Type of test data | Expected output | Actual output | Remedial Action |
---|---|---|---|---|
50, 30, 40 | Normal | 40 | ||
Abnormal | ||||
Extreme | ||||
*Assume we have a program that collects 3 exam scores and calculate the average
Specimen paper 2015
Always prompt the user about what's happening!
Imagine you are required to input some data in an online application form. Discuss and suggest some verification methods
Type | Description | Example |
---|---|---|
Please input the score: 120 Input must between 0 and 100 Please input the score: Fifty-one Input must be an integer Please input the score: 85
Before you start, what is the proper validations for those data?