Question: (python) Write a function jscore(s1, s2) that takes two strings s1 and s2 as inputs and returns the Jotto score of s1 compared with s2

(python) Write a function jscore(s1, s2) that takes two strings s1 and s2 as inputs and returnsthe Jotto score of s1 compared with s2 i.e., the number of characters in s1 that are shared by s2. The positions and the order of the shared characters within each string do not matter. Repeated letters are counted multiple times, as long as they appear multiple times in both strings. For example:

>>> jscore('diner', 'syrup') # just the 'r' 1 

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!