141k views
5 votes
Ask user to input a string from keyboard. The string must contain at least a ‘\’, a space, a lower-case letter, an upper-case letter, and a number. If the input string does not satisfy the rule, ask the user to re-input.

User Tutts
by
6.9k points

1 Answer

3 votes

Final answer:

This is a question about user input validation in the context of Computers and Technology.

Step-by-step explanation:

This question is related to Computers and Technology and is suitable for High School level. The requirement is to ask the user to input a string from the keyboard that satisfies certain conditions.

The conditions are:

  • The string must contain at least a '\\'.
  • The string must contain a space.
  • The string must contain a lower-case letter.
  • The string must contain an upper-case letter.
  • The string must contain a number.

If the entered string does not meet these conditions, the user should be asked to re-input until the conditions are satisfied.

User Lost
by
8.6k points