Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Specifications Write a program that calculates the Similarity score between two people's hobbies. A similarity score is defined as the number of common interests. The
Specifications Write a program that calculates the Similarity score between two people's hobbies. A similarity score is defined as the number of common interests. The program should take as input 2 strings with hobbies separated with spaces. It should be robust to accept both upper or lowercase, e.g. o Skiing Drawing coding o Knitting skating Coding You can assume each person will enter three items only. (More advanced student: Perhaps you can try to create a system that take in arbitrary number of items from both person 1 and 2. The number of items does not have to be the same. For example, person 1 enter 3 items and person 2 enter 10 items.). It should output the number of common interests, as shown in the example. Sample outputs: Please enter hobbies, separated by spaces. Person 1: skiing rockclimbing drawing Person 2: drawing skiing pumpkins You have 2 hobbies in common! Please enter hobbies, separated by spaces. Person 1: music reading drawing Person 2: reading Music cooking You have 2 hobbie
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