Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem C. (10 points) Front Tooth Concealment You have recently been appointed vice principal of a high school, and as such, you have the honor

image text in transcribed
Problem C. (10 points) Front Tooth Concealment You have recently been appointed vice principal of a high school, and as such, you have the honor of helping out with their graduation ceremony. You will alternate reading off the names of the graduates with the principal. Unfortunately, you got your front teeth knocked out last night while fighting crime as a masked vigilante, so you are unable to pronounce any name containing the letters 's' or 'z'. Since you don't want your enemies to learn of your secret identity, and you suspect that some of them may be present at graduation, you need to avoid saying any names containing the letters 's' or 'z'. You will read the first name from the list of graduates, meaning that you will also read the third, the fifth, the seventh, and so on. Therefore, you must ensure that all names at odd positions in the list of names (or at even indexes, since we start indexing at 0), do not contain the letters 's' or 'z'. Write a function no_front_teeth (names_list) which takes in a list of strings representing the names of the students in the order they will be read no front teeth should return a new list containing the same set of names, except rearranged such that the strings at all even indexes do not contain the characters 9.7. or their upper case variants, 'S' or 'Z'. If this is not possible because there are too many names that contain 's' or 'z', the function should instead print the string "Mission impossible too many unpronounceable names", and return an empty list Hints: Separate the names into two lists: names that contain 's' or 'z', and names that don't Then recombine them in an order that avoids any names containing so'z'in even indexed spots Constraints Do not import use any Python modules Your submission should have no code outside of function definitions except for comments Examples (text in bold is returned, text in italics is printed): >>> ne front teeth (l'Evan Bume Rosenberg'. 'Nathan Taylor Nathan Taylor', 'van Suma Rosenberg Myat >>> no front teeth ([Badman Bakib Enan', Zahra Forootaninia. Mo" 1 ) Mission Impossible too many unpronounceable names >>> no front teeth Elliot Tomas'. Alex Overman. Evan akala mo Wentzel'. race Benzen'"Tyler Wendland", "Eathi Erikson'. Laura Arias Fernandez) Mission Impossible too many unpronounceable nama Problem C. (10 points) Front Tooth Concealment You have recently been appointed vice principal of a high school, and as such, you have the honor of helping out with their graduation ceremony. You will alternate reading off the names of the graduates with the principal. Unfortunately, you got your front teeth knocked out last night while fighting crime as a masked vigilante, so you are unable to pronounce any name containing the letters 's' or 'z'. Since you don't want your enemies to learn of your secret identity, and you suspect that some of them may be present at graduation, you need to avoid saying any names containing the letters 's' or 'z'. You will read the first name from the list of graduates, meaning that you will also read the third, the fifth, the seventh, and so on. Therefore, you must ensure that all names at odd positions in the list of names (or at even indexes, since we start indexing at 0), do not contain the letters 's' or 'z'. Write a function no_front_teeth (names_list) which takes in a list of strings representing the names of the students in the order they will be read no front teeth should return a new list containing the same set of names, except rearranged such that the strings at all even indexes do not contain the characters 9.7. or their upper case variants, 'S' or 'Z'. If this is not possible because there are too many names that contain 's' or 'z', the function should instead print the string "Mission impossible too many unpronounceable names", and return an empty list Hints: Separate the names into two lists: names that contain 's' or 'z', and names that don't Then recombine them in an order that avoids any names containing so'z'in even indexed spots Constraints Do not import use any Python modules Your submission should have no code outside of function definitions except for comments Examples (text in bold is returned, text in italics is printed): >>> ne front teeth (l'Evan Bume Rosenberg'. 'Nathan Taylor Nathan Taylor', 'van Suma Rosenberg Myat >>> no front teeth ([Badman Bakib Enan', Zahra Forootaninia. Mo" 1 ) Mission Impossible too many unpronounceable names >>> no front teeth Elliot Tomas'. Alex Overman. Evan akala mo Wentzel'. race Benzen'"Tyler Wendland", "Eathi Erikson'. Laura Arias Fernandez) Mission Impossible too many unpronounceable nama

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

Advances In Databases And Information Systems 25th European Conference Adbis 2021 Tartu Estonia August 24 26 2021 Proceedings Lncs 12843

Authors: Ladjel Bellatreche ,Marlon Dumas ,Panagiotis Karras ,Raimundas Matulevicius

1st Edition

3030824713, 978-3030824716

More Books

Students also viewed these Databases questions

Question

What is Centrifugation?

Answered: 1 week ago

Question

To find integral of ?a 2 - x 2

Answered: 1 week ago

Question

To find integral of e 3x sin4x

Answered: 1 week ago

Question

To find the integral of 3x/(x - 1)(x - 2)(x - 3)

Answered: 1 week ago

Question

What are Fatty acids?

Answered: 1 week ago

Question

Address an envelope properly.

Answered: 1 week ago

Question

Discuss guidelines for ethical business communication.

Answered: 1 week ago