String Processing and Validation Mastery Quiz Quiz

  1. Reversing Basic Strings

    What is the correct reversed version of the string 'OpenAI'?

    1. IAnepO
    2. AInepO
    3. OpenAi
    4. openAI
    5. IaNepo
  2. Detecting Palindromes

    Which of the following strings is a palindrome, meaning it reads the same forwards and backwards?

    1. level
    2. lever
    3. leveel
    4. leveel
    5. leavle
  3. Validating Email Format

    Which of these is a properly formatted email address?

    1. john.doe@example.com
    2. john.doe.example@com
    3. john@doe@example.com
    4. john.doe@.com
    5. john.doe@exam_ple.com
  4. String Case Sensitivity

    If you convert 'QuizMaster2024' to all lowercase letters, what result do you get?

    1. quizmaster2024
    2. Quizmaster2024
    3. quizMaster2024
    4. QuizMaster2024
    5. quiz_Master_2024
  5. Extracting Substrings

    Given the string 'Validation', what is the substring from index 2 to 6 (exclusive)?

    1. lida
    2. alid
    3. lida
    4. alidat
    5. vali
  6. Trimming Whitespace

    After trimming whitespace from both ends, how does the string ' Hello World! ' change?

    1. Hello World!
    2. Hello World!
    3. Hello World!
    4. Hello World!
    5. HelloWorld!
  7. Checking Digit-Only Strings

    Which string contains only digits?

    1. 90210
    2. 90a210
    3. 902-10
    4. 90021o
    5. 90210.
  8. Regex Pattern Test

    Which of the following matches the regex pattern ^[A-Z][a-z]{2,}$ (an uppercase letter followed by at least two lowercase letters)?

    1. Cat
    2. car
    3. CAT
    4. Ca
    5. CAtch
  9. String Replacement

    If you replace all spaces with underscores in 'string processing quiz', what is the result?

    1. string_processing_quiz
    2. string processing_quiz
    3. string-processing quiz
    4. stringprocessingquiz
    5. string__processing__quiz
  10. Counting Substring Occurrences

    How many times does the substring 'ana' appear in 'bananas'?

    1. 1
    2. 2
    3. 3
    4. 0
    5. 4