Заглавная страница Избранные статьи Случайная статья Познавательные статьи Новые добавления Обратная связь FAQ Написать работу КАТЕГОРИИ: ТОП 10 на сайте Приготовление дезинфицирующих растворов различной концентрацииТехника нижней прямой подачи мяча. Франко-прусская война (причины и последствия) Организация работы процедурного кабинета Смысловое и механическое запоминание, их место и роль в усвоении знаний Коммуникативные барьеры и пути их преодоления Обработка изделий медицинского назначения многократного применения Образцы текста публицистического стиля Четыре типа изменения баланса Задачи с ответами для Всероссийской олимпиады по праву
Мы поможем в написании ваших работ! ЗНАЕТЕ ЛИ ВЫ?
Влияние общества на человека
Приготовление дезинфицирующих растворов различной концентрации Практические работы по географии для 6 класса Организация работы процедурного кабинета Изменения в неживой природе осенью Уборка процедурного кабинета Сольфеджио. Все правила по сольфеджио Балочные системы. Определение реакций опор и моментов защемления |
Part 2: Find single insertion or deletionПоиск на нашем сайте Find mismatch (30/30 points) Write a function named find_mismatch that accepts two strings as input arguments and returns:
Capital letters are considered the same as lower case letters. Here are some examples: First string Second String Function return Python Java Hello There helloothere sin sink 2 (note not the same length) dog Dog
Part 2: Find single insertion or deletion (30/30 points) Write a function named single_insert_or_delete that accepts two strings as input arguments and returns:
Capital letters are considered the same as lower case letters. Here are some examples: First string Second String Function return Python Java book boot sin sink 1 (Inserting a single character at the end) dog Dog poke spoke 1 (Inserting a single character at the start) poker poke 1 (Deleting a single character from the end) programing programming 1 (Inserting a single character) Part 3: Spelling corrector (40 points possible) Write a function named spelling_corrector that accepts two arguments. The first argument is a sentence (string) and the second argument is a list of words (correct_spells). Your function should check each word in the input string against all the words in the correct_spells list and return a string such that:
Notes:
Examples: Sentence (str) correct_spells (list) Function return (str) Thes is the Firs cas ['that','first','case','car'] thes is the first case programing is fan and eesy ['programming','this','fun','easy','book' ] programming is fun and easy Thes is vary essy ['this', 'is', 'very', 'very', 'easy'] this is very easy Wee lpve Pythen ['we', 'Live', 'In', 'Python'] we live python Notice:
Please notice that this assignment is only an exercise and a real spell checker requires more functionalities. Hint: You should use the functions that you developed in part 1 and part 2 to help you solve this problem.
|
||
|
Последнее изменение этой страницы: 2024-07-06; просмотров: 41; Нарушение авторского права страницы; Мы поможем в написании вашей работы! infopedia.su Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав. Обратная связь - 216.73.216.198 (0.005 с.) |