yes want to know how to keep an idiot busy for hoursyes want to know how to keep an idiot busy for hoursyes!!!!!'yes!!!!!!is not valid yes/no response want to know how to keep an idiot busy for hourstell me how to keep an idiot busy for hours 'tell me how to keep an idiot busy for hours is not valid yes/no response want to know how to keep an idiot busy for hoursno thank you have nice day open new file editor tab and save it as idiot py then enter the following codeimport pyinputplus as pyip this imports the pyinputplus module since pyinputplus is bit much to typewe'll use the name pyip for short while trueprompt 'want to know how to keep an idiot busy for hours?\nresponse pyip inputyesno(promptnextwhile truecreates an infinite loop that continues to run until it encounters break statement in this loopwe call pyip inputyesno(to ensure that this function call won' return until the user enters valid answer if response ='no'break the pyip inputyesno(call is guaranteed to only return either the string yes or the string no if it returned nothen our program breaks out of the infinite loop and continues to the last linewhich thanks the userprint('thank you have nice day 'otherwisethe loop iterates once again you can also make use of the inputyesno(function in non-english languages by passing yesval and noval keyword arguments for examplethe spanish version of this program would have these two linesprompt '?quieres saber como mantener ocupado un idiota durante horas?\nresponse pyip inputyesno(promptyesval='si'noval='no'if response ='si'now the user can enter either si or (in loweror uppercaseinstead of yes or for an affirmative answer input validation