We can use the Jaccard distance to find the difference between two objects (sets). It is also used as a complement to the Jaccard similarity. The formula is . Take words as input from two different lines. Calculate the Jaccard distances and print the results. Use spaces when retrieving words from the input.
The Jaccard similarity index
Find the distance
Report a typo
Sample Input 1:
cat window sister dog
cat sister dog whoSample Output 1:
0.4Write a program in Python 3
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.