C1_W3_Assignment: # UNQ_C3 GRADED FUNCTION: get_country

The return type for this function is incomplete. It should return
“country, similarity”

It returns only “country.” This cannot be right since the test expects “country, similarity” to be returned.

image

The next test corroborates my statement:
image

It fails if “similarity” is not returned with “country” as a tuple: “country, similarity.”

Hey @ajeancharles,
Please note the last line of comment in the function get_country.

store the country as a tuple, which contains the word and the similarity

In simple words, you are supposed to store the name of the country, and it’s associated similarity as a tuple in the variable country, which the function returns. I hope this helps.

Cheers,
Elemento

The return signature did not contain the “associated similarity.” It was “return country”.
I changed it to “return country, similarity” when I saw the expected result of the test.

Hi @ajeancharles

You should not do this:

You should have changed what the country variable holds. As Elemento correctly pointed out, it should have been a tuple - country = ( something?, similarity ) and not country = something. The naming of the variable is a bit misleading and this mistake happens quite often because of that. Naming it (by course creators) country_sim might have been a better choice.

Changing the code outside ### END CODE HERE ### might break the grader and you could fail the grading.

Cheers