Programming, Data Structures And Algo Using Python Assignment 8 Answers 2022:- In This article, we have provided the answers of Programming, Data Structures And Algo Using Python Assignment 5 You must submit your assignment to your own knowledge.
What is Programming Data Structures And Algorithms Using Python?
While hard skills teach us what to do, soft skills tell us how to apply our hard skills in a social environment. The focus of the course is to develop a wide variety of soft skills starting from communication, to working in different environments, developing emotional sensitivity, learning creative and critical decision making, developing awareness of how to work with and negotiate with people and to resolve stress and conflict in ourselves and others.
The uniqueness of the course lies in how a wide range of relevant issues are raised, relevant skills discussed and tips for integration provided in order to make us effective in workplace and social environments.
CRITERIA TO GET A CERTIFICATE
Average assignment score = 25% of the average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100
Final score = Average assignment score + Exam score
YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF THE AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.
Below you can find the answers for Programming Data Structures And Algo Using Python Assignment 8
Programming, Data Structures And Algo Using Python Assignment 8 Answers 2022:-
Find the longest palindrome
(IARCS OPC Archive, K Narayan Kumar, CMI)
As we all know, a palindrome is a word that equals its reverse. Here are some examples of palindromes: malayalam, gag, appa, amma.
We consider any sequence consisting of the letters of the English alphabet to be a word. So axxb,abbba and bbbccddx are words for our purpose. And aaabbaaa, abbba and bbb are examples of palindromes.
By a subword of a word, we mean a contiguous subsequence of the word. For example the subwords of the word abbba are a, b, ab, bb, ba, abb, bbb, bba, abbb, bbba and abbba.
In this task you will given a word and you must find the longest subword of this word that is also a palindrome.
For example if the given word is abbba then the answer is abbba. If the given word is abcbcabbacba then the answer is bcabbacb.
N = int(input()) word = input() ans = str() for i in range(len(word)): for j in range(len(word)-1,i-1,-1): if word[i] == word[j]: m = word[i:j+1] if m == m[::-1]: if len(ans) <= len(m): ans = m print(len(ans)) print(ans)
👇FOR NEXT WEEK ASSIGNMENT ANSWERS👇
Disclaimer:- We do not claim 100% surety of solutions, these solutions are based on our sole expertise, and by using posting these answers we are simply looking to help students as a reference, so we urge to do your assignment on your own.
For More NPTEL Answers:- CLICK HERE
Join Our Telegram:- CLICK HERE
Programming, Data Structures And Algo Using Python Assignment 8 Answers 2022:- In This article, we have provided the answers of Programming, Data Structures And Algo Using Python Assignment 8 You must submit your assignment to your own knowledge.