Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

New Quizalize solo game modes
10 questions
Show answers
  • Q1
    What is meant by input validation?
    Validation is making sure the users input is in the correct format
    Validation is verifying the identity of a user
    Ensuring the user is using an input device such as a keyboard
    Validation is testing for syntax errors
    30s
    3.2.12.a
  • Q2
    How could you add validation to make sure the user can only enter whole numbers for age?
    TRY INT_TO_STRING(age) CATCH OUTPUT("You must enter your name")
    TRY STRING_TO_INT(age) CATCH OUTPUT("You must enter your name")
    TRY OUTPUT("You must enter your name") CATCH STRING_TO_INT(age)
    TRY STRING_TO_INT(age)
    30s
    3.2.12.a
  • Q3
    Why do we need input validation?
    To avoid syntax errors
    To avoid run-time errors
    To make sure the program is fully tested
    To make sure the person using the program is allowed
    30s
    3.2.12.a
  • Q4
    What is user validation?
    Ensuring the correct user is accessing the program
    Making sure the users input is in the right format
    Checking for logical errors in a program
    Testing a program by getting users to try it
    30s
    3.2.12.a
  • Q5
    Which of these is a type of input validation?
    All of these
    Range check
    Data type check
    Minimum length
    30s
    3.2.12.a
  • Q6
    How can you check if the length of the string is empty?
    IF (password) == 0: OUTPUT ("Password accepted")
    IF (password) == 0: OUTPUT ("You must enter a value")
    IF POSITION(password) == 0: OUTPUT ("You must enter a value")
    IF LEN(password) == 0: OUTPUT ("You must enter a value")
    60s
    3.2.12.a
  • Q7
    What the program is doing?
    Question Image
    It's reading all of the line in scores.txt without checking if the file exists
    It's loading the function to find the scores text file
    It's writing the scores to file
    It's checking whether the file exists
    30s
    3.2.12.a
  • Q8
    The test is marked out of 100. Which line of code makes sure the user enters a number between 0 and 100?
    IF mark < 0 OR mark > 100 OUTPUT "The score must be between 0 and 100
    IF mark < 1 OR mark > 100 OUTPUT "The score must be between 0 and 100
    IF mark < 0 AND mark > 100 OUTPUT "The score must be between 0 and 100
    IF mark <= 0 OR mark >= 100 OUTPUT "The score must be between 0 and 100
    60s
    3.2.12.a
  • Q9
    How can regular expressions help with input validation?
    They can only be used for passwords so it will not always help
    It will create a set of rules for expected input that the users input can be compared with
    It will delete any input that doesn't exactly match
    It will only allow users to type expressions that match the conditions
    60s
    3.2.12.a
  • Q10
    Why is input validation so important on websites or web-based applications?
    To keep credit card information secure
    To make it easier for SQL injections
    To help the user log in quicker
    To prevent SQL injections from happening
    60s
    3.2.12.a

Teachers give this quiz to your class