Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You have just been hired by the government secret services Mission Impossible department. The secret service intelligence has shown that terrorists have been hiding their

You have just been hired by the government secret services Mission Impossible department. The secret service intelligence has shown that terrorists have been hiding their identities by removing one letter from their last name (family name). That way, the software used to determine if a terrorist has crossed the border or not becomes inefficient as it does not match the terrorist list of names with the one on the passport since it has one missing letter. To protect your country, your job is to create a software that matches fake (modified) terrorist names with the list of identified terrorists. Your program starts by asking the user to enter the names of the 50 most popular terrorists. The names MUST be entered as ONE string containing first name and last name (in this program we do not handle composed first names or last names). Then in a loop, you ask the user to enter the full name of the person they have doubts about (you decide how to stop the loop in any way you like). Your program must output one of the following: - The name is legit (not terrorist), let them pass. - The name is the one of a terrorist, the missing letter is : X , it is located in index: Y of the last name. You must use the following 3 functions (if you need additional functions feel free to add them): - Isolate: this function takes as input the full name (first name last name separated by a space) and outputs the index where the last name starts - Isterrorist: this function takes 2 strings and returns 1 if the last name is the one of a terrorist (shorter by 1 letter than the one in the list AND all the letters in the entered last name exist in the last name) Or it returns 0 in case the last name is not the one of a terrorist in the list. - find_differences: function that takes the last name of a confirmed terrorist and its correct version from the list of terrorists and out puts 2 things: the missing letter and the index of the missing letter (where the letter exists in the correct name). You Must use the 3 functions above and you MUST not use global variables

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 Organizing Information Digital And Information Literacy

Authors: Greg Roza

1st Edition

1448805929, 978-1448805921

More Books

Students also viewed these Databases questions

Question

What is management growth? What are its factors

Answered: 1 week ago

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago