0

My test case 5 in python intermediate 4.2 lesson is not working, but all the other test cases are correct.

Not able to proceed forward,although I think my code is correct. Can someone help?

31st Aug 2022, 1:43 PM
Radni D
Radni D - avatar
6 odpowiedzi
+ 4
Please show your code so we can tell you how to correct it. Without seeing your code we can't see what the issue is.
31st Aug 2022, 2:02 PM
Lisa
Lisa - avatar
+ 3
Read the task description again: "Not Found" with capital "F"
1st Sep 2022, 5:56 AM
Lisa
Lisa - avatar
+ 1
It worked....thanks a lot!!!!😃
1st Sep 2022, 1:26 PM
Radni D
Radni D - avatar
0
contacts=[ ('James', 42) ('Amy', 24) ('John', 31) ('Amanda', 63) ('Bob', 18) ] name=input() for person,age in contacts: if name==person: print( person, "is", age) break else: print("Not found") This was the first code I used but it didn't satisfy test case 5 which is locked.
1st Sep 2022, 4:21 AM
Radni D
Radni D - avatar
0
Another one that I tried: name=input() for x in contacts: if name in x: print(str(x[0])+" is " + str(x[1])) else: print("Not found")
1st Sep 2022, 4:24 AM
Radni D
Radni D - avatar