Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 Here are 2 sample runs: Write a program that calculates the Similarity score between two people's hobbies. A similarity score is defined as

image text in transcribed
Question 1 Here are 2 sample runs: Write a program that calculates the Similarity score between two people's hobbies. A similarity score is defined as the number of common interests. Please enter hobbies, separated by spaces. Person 1: skiing rockclimbing drawing Person 2: drawing skiing pumpkins You have 2 hobbies in common The program should take as input 2 strings with hobbies separated with spaces. It should be robust to upper/lowercase, e.g. Please enter hobbies, separated by spaces. Person 1: Snowboarding Rockclimbing TV Person 2: Rockclimbing tv snowboarding You have 3 hobbies in common! Skiing Drawing coding Knitting skating Coding It should output the number of common interests, as shown in the example. 13

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions