0

Tuples test case 5

I'm trying to do the Tuples code challenge, but whatever I try, i can't pass test case 5. Can anyone help? Here is the code I'm using: contacts = [ ('James', 42), ('Amy', 24), ('John', 31), ('Amanda', 63), ('Bob', 18) ] name = input() for x in contacts: if name in x: print(str(x[0]) + " is " + str(x[1])) break else: print("Not found")

24th Aug 2022, 9:51 AM
Jack Winning
Jack Winning - avatar
5 Respostas
+ 3
Check the task description again: We need to output "Not Found" with capital F. Does it work for you?
24th Aug 2022, 10:22 AM
Lisa
Lisa - avatar
+ 2
Please tag the relevant programming language and show your code.
24th Aug 2022, 9:53 AM
Lisa
Lisa - avatar
+ 2
Oh my god 🤦🏻‍♂️ Thank you Lisa ! I can't believe it was that simple.
24th Aug 2022, 10:24 AM
Jack Winning
Jack Winning - avatar
+ 1
Hi! Can you please save your code as code bit and link it here? That way we can see what's wrong and help you :)
24th Aug 2022, 9:54 AM
praneetha
praneetha - avatar
+ 1
Thanks Lisa and praneetha, I've updated my post with the code and language
24th Aug 2022, 10:00 AM
Jack Winning
Jack Winning - avatar