'helloisalpha(true 'hello isalpha(false 'hello isalnum(true 'helloisalnum(true ' isdecimal(true isspace(true 'this is title caseistitle(true 'this is title case istitle(true 'this is not title caseistitle(false 'this is not title case eitheristitle(false the isx(string methods are helpful when you need to validate user input for examplethe following program repeatedly asks users for their age and password until they provide valid input open new file editor window and enter this programsaving it as validateinput pywhile trueprint('enter your age:'age input(if age isdecimal()break print('please enter number for your age 'while trueprint('select new password (letters and numbers only):'password input(if password isalnum()break print('passwords can only have letters and numbers 'in the first while loopwe ask the user for their age and store their input in age if age is valid (decimalvaluewe break out of this first while loop and move on to the secondwhich asks for password otherwisewe inform the user that they need to enter number and again ask them to enter their age in the second while loopwe ask for passwordstore the user' input in passwordand break out of the loop if the input was alpha numeric if it wasn'twe're not satisfiedso we tell the user the password needs to be alphanumeric and again ask them to enter password manipulating strings