Helpe me!!
Hi people! I am doing a Python practice using Tuples. You are given a list of contacts, where each contact is represented by a tuple, with the name and age of the contact. Complete the program to get a string as input, find the name in the contact list and get its age in the format presented below: Example entry: "John". Output example: John is 31 This is the final algorithm I have made. contacts = [ ('James', 42), ('Amy', 24), ('John', 31), ('Amanda', 63), ('Bob', 18) ] name = input() found = False for i in contacts: if(name == i[0]): print(name, " is", i[1]) found = True break if(not found ): print("Not Found") Everything seems to be in order, but when I run the tests I get errors in some test cases. The funny thing is that the error messages report: Entry: Amanda Your result: Amanda is 63 Expected result: Amanda is 63 Any idea?