This test is run by .
Note that your final mark will not be saved in the system.
Note that your final mark will not be saved in the system.
Robust and Secure Programming Typeit
Target Level
4-5
Running Total
0
0%
Attempt
1 of 3
Type the correct answers into the spaces. Fill all the spaces before clicking ‘Check Answers!’
The code snippet below shows a type of validation. Complete the missing code.
valid ← PRINT('Please enter your age: ') REPEAT age ← USERINPUT TRY age_Num ← STRING_TO_INT() # the type check valid ← IF < 16 THEN PRINT('You cannot drive anything yet') age_Num >= 16 age_Num < 21 THEN PRINT('You can drive a moped at 16 and a car at 17') ELSE PRINT('You can now drive any vehicle') CATCH PRINT('Please enter age as a number in years') valid