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

Hello Guys,
" Add another node connected to B to your graph and call it C.
Modify your existing dictionary to represent this arrangement. Use a list to represent the multiple connections of your B node."
…is the Task at hand. As far as i can see i did everything the lecture demanded, adding another node and let the graph represent it- nevertheless my Code raised an error. :frowning:
help is really appreciated, i had the feeling that it must had been some kind of a punctuation mistake, maybe im blind but i cant find the mistake here… :sleepy:

Your code so far


# User Editable Region

my_graph = {
    'A':'B',
    'B':['A','C']
    'C':'B'
}

# User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

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

Hello there!
True , its a punctuation mistake
After making the list for the B node connections, you forgot to separate it from node C with a comma , and that’s the error, happy coding :slightly_smiling_face:

1 Like

oh my gawddd :man_facepalming:
i think i need a break.
Thank you!

1 Like

yahh samething happened to me yesterday, Coded for 10hrs

1 Like

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