in python language 2. Section #Prog Question 1 How to Attempt? Halindrome Given a string S, divide
Fantastic news! We've Found the answer you've been seeking!
Question:
in python language
Transcribed Image Text:
2. Section #Prog Question 1 How to Attempt? Halindrome Given a string S, divide it into two equal parts S1 and S2. S is called a halindrome if at least any one of the following condition 1. S is a palindrome and length of S>=2. 2. S1 is a halindrome. 3. S2 is a halindrome. Your task is to find and return the number of halindromes in an array F Note: In the case of an odd length string, the middle element is not present in both middle element is m, then, S1 = S [0, m-1] and S2 = S [m+1, [S]-1]. Input Specification input 1: An integer value denoting the number of strings (1<=input input 2: A string array of size input1 (2 <= length of each string <=1 Output Specification Return the number of strings which are halindromes. Example 1 Metti Online Assessment 2021-2031 2. Section #Prog Question 1 How to Attempt? Halindrome Given a string S, divide it into two equal parts S1 and S2. S is called a halindrome if at least any one of the following condition 1. S is a palindrome and length of S>=2. 2. S1 is a halindrome. 3. S2 is a halindrome. Your task is to find and return the number of halindromes in an array F Note: In the case of an odd length string, the middle element is not present in both middle element is m, then, S1 = S [0, m-1] and S2 = S [m+1, [S]-1]. Input Specification input 1: An integer value denoting the number of strings (1<=input input 2: A string array of size input1 (2 <= length of each string <=1 Output Specification Return the number of strings which are halindromes. Example 1 Metti Online Assessment 2021-2031
Expert Answer:
Answer rating: 100% (QA)
Python Program function to check the string is Palindrome or not def ... View the full answer
Related Book For
Thermodynamics An Engineering Approach
ISBN: 978-0073398174
8th edition
Authors: Yunus A. Cengel, Michael A. Boles
Posted Date:
Students also viewed these programming questions
-
Please write in Python Language to create a Program for Contact Management System. It is similar to the contact manager in cell phones. In this program, you can add, view, edit, search, and delete...
-
: Write code in the next cell to do the following: 1. Asks the user for their first, middle, and last names and stores each in a new variable. 2. Computes the length of the name not including spaces...
-
Metro Land is a country located on a 2D Plane. They are having asummer festival for everyone in the country and would like tominimize the overall cost of travel for their citizens. Costs oftravel are...
-
An inverted pyramidal tank has an equilateral triangular base measuring 3 ft. on a side and an altitude of 7 ft. DSMIT adi a. How many gallons of water can the tank hold? b. What will be the wetted...
-
What information is required in a proxy statement?
-
If the actual termination of a project becomes a project in itself, what are the characteristics of this project? How is it different from other projects?
-
Continuing to focus on evidence associated with the act, concealment, and conversion, use the evidentiary material to continue the examination. In addition, the examiner also starts to think of terms...
-
At week 24 of a project to shoot a television commercial, the project manager is worried about her budget since costs have risen to $7,500. Is there a cost overage? If so, how much is it? Is the...
-
There are 15 exceptions to carrier liability under the Carriage of Goods by Sea Act other than "perils of the sea". Which ones are similar to an event of force majeure that are usually placed in a...
-
FS Partners is a general partnership whose partners are Jerry Stahlman, a professional engineer, and Fitz & Smith, Inc., a corporation in the business of excavating and paving. Timothy Smith signed...
-
Find an organizational incident or event which reflected poorly on the entity. It may be a current news story or conduct internet searches for an incident (less than five years old). Provide a brief...
-
What laws regulate employee working conditions?
-
Discuss the role of sponsorship in the promotional mix.
-
What are the wrongful discharge exceptions to employment-at-will?
-
Discuss the advantages and related challenges of segmenting the market.
-
What is the after-acquired evidence rule?
-
Suppose that in a random selection of 100 colored candies, 21% of them are blue. The candy company claims that the percentage of blue candies is equal to 29%. Use a 0.01 significance level to test...
-
A woman at a point A on the shore of a circular lake with radius 2 mi wants to arrive at the point C diametrically opposite on the other side of the lake in the shortest possible A time. She can walk...
-
A 600-MW steam power plant, which is cooled by a nearby river, has a thermal efficiency of 40 percent. Determine the rate of heat transfer to the river water. Will the actual heat transfer rate be...
-
Consider two Carnot heat engines operating in series. The first engine receives heat from the reservoir at 1400 K and rejects the waste heat to another reservoir at temperature T. The second engine...
-
The pump of a water distribution system is powered by a 15-kW electric motor whose efficiency is 90 percent. The water flow rate through the pump is 50 L/s. The diameters of the inlet and outlet...
-
Acne Medication and Gastrointestinal Injury Since 1999, Kamie Kendall had experienced ongoing abdominal pain, and she was eventually diagnosed with ulcerative colitis and irritable bowel syndrome...
-
In 1951, DuPont began using the chemical perfluorooctanoic acid to manufacture Teflon. Due to the dangerous nature of the chemical, DuPont was given special instructions by its supplier to dispose of...
-
CMS is a claims processing company in Mobile, Alabama. Chastity Jones, a black woman, completed an online employment application for a customer service position with CMS. Jones interviewed with a...
Study smarter with the SolutionInn App