Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer this CONGRATULATIONS!!! You have just been hired by the Moroccan secret services' Mission Impossible department. The secret service intelligence has shown that terrorists

Please answer this

image text in transcribed
CONGRATULATIONS!!! You have just been hired by the Moroccan 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 inefcient 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 (modied) terrorist names with the list of identied 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 rst name and last name (in this program we do not handle comwed rst 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 (rst 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. - findudifferences: 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

Global Business Today

Authors: Charles Hill

9th Edition

1259299201, 9781259299209

More Books

Students also viewed these Economics questions

Question

6. How can hidden knowledge guide our actions?

Answered: 1 week ago