Start a Thread

Subscribe You’re not receiving notifications from this thread.

Array Intersection: Solution doesn't run in IDE, but runs in my Terminal

Challenges β€’ Asked over 1 year ago by Kaitlin

Kaitlin Commented on Jan 20, 2023:

Can you tell me what's wrong here?

My solution isn't running in the AlgoDaily IDE. The error says: "No Output."
However, the seems to return the correct result when I run it in Python on my Terminal.

Screenshot from Algo Daily:
Screenshot of my Terminal:

Why doesn't this run? Also, the Python solution given for sets in this example is incomplete. In the Javascript video, the set solution is shown with a filter method, which isn't included at all in the Python solution, which seems to try to recursively call on itself. This solution should probably be updated with the line that runs a filter with lambda function.

EDIT 1: Realizing that trying to add images with markdown that were uploaded to ImgBB doesn't actually work on this forum, so displaying screenshots inside this post is impossible... πŸ›πŸž Here are the links to click on to see the images hosted on ImgBB.

EDIT 2: Realizing that markdown for including links ALSO doesn't work on this forum. πŸžπŸ› So, copy-pasting the links would be necessary to view these images.

Hmm...maybe fixing the forum so that Markdown is enabled, or removing the toolbar and illusion that this feature is possible, would be a first priority over fixing the incorrect Python solution code and broken Python IDE. I don't know.

Jake from AlgoDaily Commented on Jan 21, 2023:

Hi Kaitlin,

In your screenshot, it appears you're not actually invoking or logging the function.

You need to actually call intersection(first, second) and then actually print it, something like:

print(intersection(first, second))

We'll update that screen to make it more clear!

Kaitlin Commented on Jan 23, 2023:

Ah thanks for that, Jake! Really silly mistake on my part. Appreciate your response!

BernaLuke Commented on Feb 09, 2023:

This is useful information !