#NEWLINE# def prompt_user( query , results ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# response = None #NEWLINE# short_respones = 0 #NEWLINE# while ( not response ) : #NEWLINE# #INDENT# response = input ( '{}\nYour Response: ' . format ( query ) ) #NEWLINE# if ( ( not response ) or ( len ( response ) < 5 ) ) : #NEWLINE# #INDENT# short_respones += 1 #NEWLINE# if ( short_respones > 2 ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# print ( 'Please enter at least a sentence.' ) #NEWLINE# #UNINDENT# #UNINDENT# results [ 'prompts' ] [ query ] = response #NEWLINE# return response #NEWLINE# #UNINDENT# except KeyboardInterrupt : #NEWLINE# #INDENT# results [ 'prompts' ] [ query ] = 'KeyboardInterrupt' #NEWLINE# try : #NEWLINE# #INDENT# print ( 'Exiting Hint' ) #NEWLINE# return '' #NEWLINE# #UNINDENT# except KeyboardInterrupt : #NEWLINE# #INDENT# return ''