Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QH1: update the following exa3-5 by using 2 functions: getWordst) to return word1 and word2 showCommon(word1,word2) to decide what is common. then run your program

image text in transcribed
QH1: update the following exa3-5 by using 2 functions: getWordst) to return word1 and word2 showCommon(word1,word2) to decide what is common. then run your program to have the same running of this example. \#Dr. Nagi Soliman \#Ask the user for 2 words then search and for common letters \#in the two words and display them. wordl=input("Enter Word \#1:") word2=input("Enter Word \#2: ") common="' for letter in word1: if (letter in word2) and (letter not in common): common+=letter if common = "": print("The words share no characters.") else: print("The words have the following in common letters",common) Python Run: Enter Word \#1: Soliman Enter Word \#2: Nagi The words have the following in common letters ia

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

Databases Illuminated

Authors: Catherine Ricardo

2nd Edition

1449606008, 978-1449606008

More Books

Students also viewed these Databases questions