Learn Algorithm Design by Building a Shortest Path Algorithm - Step 3

Tell us what’s happening:

Keys must be unique within a dictionary and they can be only immutable data types. This means you cannot use a list or another dictionary as keys.

Add another key age to your dictionary and give it the integer number 2 as value.

idk what is the problem

Your code so far


# User Editable Region

copper = {'species': 'guinea pig', 'age': '2'}

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 OPR/107.0.0.0

Challenge Information:

Learn Algorithm Design by Building a Shortest Path Algorithm - Step 3

At first glance I believe the issue you are having is, the instructions say:

The number 2 you are assigning to age key is a string, it’s asking for an integer (check quotation).

Hope this helps,
Good luck :+1:

1 Like

what’s the difference between a number and a string?

1 Like

I’ve alredy done the exercise, but thanks for reply buddy :wink:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.