Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write Python program with a function named print_common_characters that gets as parameters two strings. The function returns the number of characters that the strings have

image text in transcribed

image text in transcribed

Write Python program with a function named print_common_characters that gets as parameters two strings. The function returns the number of characters that the strings have in common. Each character counts only once, e.g., the strings "bee" and "peer" only have one character in common (the letter "e"). You can consider capitals different from lower case letters. Note: the function should return the number of characters that the strings have in common, and not print it. Input First line of input is the first string Second line of input is the second string Output The number of common characterse Sample Input 1 Copy see peer Sample Output 1 Copy 1 Sample Input 1 see peer Sample Output 1 1 Sample Input 2 seven seventeen Sample Output 2 4

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Database Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions

Question

1. What is Ebola ? 2.Heart is a muscle? 3. Artificial lighting?

Answered: 1 week ago

Question

3. You can gain power by making others feel important.

Answered: 1 week ago