Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started