Input/output

EasyMediumHard
123456789101112131415
Question 9
Easy

The user enters a value representing a booking discount rate. The discount is a decimal, where 0.05 represents a 5% discount. This allowed discount must be between 0.00 (0%) and 0.40 (40%) inclusive. The entered value needs to be validated.

Construct two different validation tests. Test data for Test 1 is provided in the table.

Complete the table by filling in (a), (b), and (c).

TestValidation testTest data
Test 1
a.

| 0.45 | | Test 2 |

[1]
b.

|

[1]
c.

|

[1]

Input/output Questions

  1. GCSE
  2. /Computer Science
  3. /Input/output