''' a while loop that checks for a Y or N for the correct answer. if the wrong anser is given,the script asks again the question AUTHOR: ERRIKOS NTINOS DATE: 15/02/2022 STATUS: verified ''' # change the script,to fit your need! choise=raw_input("Do you like Python? ' yes/no '") counter=1 while choise !="yes" and choise !="no" and counter<=2: choise=raw_input("Wrong answer!I need yes or no ") if choise!='yes' and choise!='no': counter=counter+1 if counter > 2: print "You gave me", counter ,"wrong answers! Giving up....." else: print"OK...You gave me" , choise