Question: python 3.6 the error located in this function def get_response(string): Gets a letter from the user Parameters: string, a string Returns: response.lower, a string response=input()

python 3.6

the error located in this function

def get_response(string): """Gets a letter from the user Parameters: string, a string Returns: response.lower, a string""" response=input() i=0 if string.find(response.lower())!=-1: cha=string.find(response.lower()) return string[cha] else: return get_response(string)

the main function is

def main(): """ top level manager of the program. in charge of calling many helpers in the right order. p: N/A R: usually None, thid time, a list of landers """ greeting() lol=[] answer="a" while True: if answer=="a": lol.append(perform_landing()) #l = perform_landing() #lol.append(perform_landing()) if answer =="r": n=get_integer(len(lol)) show_history(lol[n])#list of list of something answer = get_response("qra")# qra in an example if answer=="q": return lol

how can I solved is problem

# Test to verify that main() uses get_lander() and human_controller() main() m Used get_lander Used human_controller Used Lander from get_lander in human_controller Used get_lander Traceback (most recent call last): File "prog.python3", line 419, in main l=__main() File "prog.python3", line 20, in main answer = get_response("qra")# qra in an example File "prog.python3", line 52, in get_response response=input() EOFError: EOF when reading a line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!