help me to find the bug of this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

help me to find the bug of this code?

when the code is run it gets no output? https://code.sololearn.com/c7jc6pr9FRjF/?ref=app

23rd Feb 2023, 3:16 AM
Lidwina Harefa
Lidwina Harefa - avatar
10 Answers
+ 4
No bug. No output statements so no output. x.add_friend(7, 5) Try this and you get "error" Output. print(a) #add this you get a value.
23rd Feb 2023, 7:41 AM
Jayakrishna 🇮🇳
+ 1
That is right. I have no idea what the code is about, but go through it yourself. When do you print anything? And you will find: Never. If at all you are just setting some list values.
23rd Feb 2023, 4:23 AM
Ani Jona 🕊
Ani Jona 🕊 - avatar
+ 1
Jayakrishna 🇮🇳 the score is out, but why doesn't the quiz work?
23rd Feb 2023, 8:21 AM
Lidwina Harefa
Lidwina Harefa - avatar
+ 1
Lidwina Harefa Which quiz? Can you details about task or add link for the problem description?
23rd Feb 2023, 8:24 AM
Jayakrishna 🇮🇳
+ 1
Lidwina Harefa I can not see any 26.2 . There is only 26.1. Next 27.1 May be that is new course, which are currently available to new users only..
23rd Feb 2023, 9:18 AM
Jayakrishna 🇮🇳
+ 1
Lidwina Harefa The task you are telling not available to my course. May be you are new user so it's available to you now. You can copy paste task description here so then we can also try, if you want it.
23rd Feb 2023, 5:52 PM
Jayakrishna 🇮🇳
0
Jayakrishna 🇮🇳 In the python data structure quiz. In chapter 26.2
23rd Feb 2023, 8:27 AM
Lidwina Harefa
Lidwina Harefa - avatar
0
Jayakrishna 🇮🇳 In the quiz answers only take the last number
23rd Feb 2023, 8:34 AM
Lidwina Harefa
Lidwina Harefa - avatar
0
Jayakrishna 🇮🇳 in the case of graphs "Let's connect"
23rd Feb 2023, 10:21 AM
Lidwina Harefa
Lidwina Harefa - avatar
0
Your code works absolutely fine. Just add `print(x.adj)`. I tested it with input=4 and the adjacency matrix was correct.
24th Feb 2023, 7:37 AM
Jan Reichelt
Jan Reichelt - avatar