Computer Science, asked by dashankit1998, 4 months ago

Given two strings, the task is to check how many characters in the strings are commo
Examples 1:
Input:
Maventic and Maven
Output:
5​

Answers

Answered by allysia
0

USING PYTHON:

\\\tt a=str(inp ut("Enter \ the\  first \  word: "))\\\tt b=str(inp ut("Enter\ the\ second\ word: "))\\\tt count=0\\\ttfor\ i\ in\ a:\\\tt{\qquad    for\ j\ in\ b:}\\\tt{\qquad {\qquad        if\ i==j:}} \\\tt {\qquad {\qquad{\qquad           count+=1}}} \\\tt print(count)

Similar questions