Examples of palindromes

Assignment Help Business Management
Reference no: EM132261441

An palindrome is a word that's the same when you reverse the letters.

Examples of palindromes:

  • poop
  • Racecar
  • Never odd or even

In this homework write a function that uses recursion to check if given word is a palindrome.

Problem Solve

Figure out how you can use recursion to solve this problem. Here are some hints:

  • If a word has 1 letter, it's always a palindrome
  • If a word has 2 letters, it's a palindrome if they're both the same letter
  • If a word has 3 or more letters, it can only be a palindrome if the first and last letter are the same, and the letters inside those are also a palindrome

Write a function that meets these requirements

  • It's named check_palindrome()
  • Accept one argument, a string
  • If the argument is a palindrome, return True. If it isn't, return False
  • Ignore spaces in the provided argument. String.replace() might be useful here.
  • Ignore case. A capital letter is the same as a lowercase letter. String.lower() or String.upper() might be useful here.
  • It does not use any loops. It uses recursion instead.

Examples

Document it

Write a DocString for your function

Use inline code comments where appropriate

If you use code written by someone else, cite your sources. Indicate If this code is from the Internet, this must include a hyperlink to the webpage.

Reference no: EM132261441

Questions Cloud

Find natalie merchants song gold rush brides : Find Natalie Merchant's song "Gold Rush Brides." Listen to it. Enjoy it. Read the Lyrics
Difference between a physical and virtual entity : What is the difference between a physical and virtual entity?
Type of wireless networking : You are trying to access the WiFi network at a coffee shop. What protocol will this type of wireless networking most likely use?
Discuss how things have changed in the time since sinclair : For your Jungle paper assignment, select a topic related to urbanization, industrialization, immigration and Gilded Age politics that Upton Sinclair's book.
Examples of palindromes : An palindrome is a word that's the same when you reverse the letters.
Entity integrity and referential integrity : What does it mean to say that a database displays both entity integrity and referential integrity?
On what bases did elk argue that he had a right to vote : What did the majority of the US Supreme Court justices decide about Elk's status and rights? What were the bases of their decisions?
Use of trade secrets to protect intellectual property : Are there any drawbacks with the use of trade secrets to protect intellectual property?
How social class affected an individuals level of agency : Analyze how social class affected an individual's level of agency during the Mexican Era. Consider the factors that defined an individual's social status.

Reviews

Write a Review

Business Management Questions & Answers

  Establish long-term goals and objectives

Write a 1,050-word report on the company you selected in Week 3, following up on the Individual Assignment of Week 3 (Environmental Scanning), and address the following:

  Decision for a hypothesis test

Which of the following is the correct decision for a hypothesis test using a = .05.

  Define the master budget and its guidelines to use

What are the benefits to creating a master budget? What are the risks in not creating a master budget?

  Find the expected shape of the distribution of the sample

Information from the American Institute of Insurance indicates the mean amount of life insurance per household in the United States is $110,000. This distribution follows the normal distribution with a standard deviation of $40,000.  Find the expecte..

  Prepare 4 column table that summarizes the p to p processes

Prepare a 4-column table that summarizes the PtoP processes, inputs, and outputs. In the first column, list the four processes shown in the level 0 diagram (Figure 1).

  Marketing consultant to johannesburg burger supply

You have been hired as a marketing consultant to Johannesburg Burger Supply, Inc., and you wish to come up with a unit price for its hamburgers in order to maximize its weekly revenue.

  Describe the difference between good as well as bad table

Describe the difference between good as well as bad table structures. How do you identify the difference between good as well as bad structures?

  Change management concept to meet technology demand

Discuss and explain how large companies and small companies could utilize change management concepts to meet growing technology demands.

  Discuss several security concerns with the given approach

Discuss several security concerns with this approach to dealing with forgotten passwords.

  Discuss the strengths and weaknesses of the dispute process

Discuss the ethical issues that can arise in contracting. Analyze and discuss the strengths and weaknesses of the dispute process using the concepts discussed in the text.

  Warehouse is becoming a real issue

Safety in the warehouse is becoming a real issue.The accident rate has tripled since last year.Something has to be done.

  Describe how this activity helped you in understanding

Describe how this activity helped you in understanding the utility bills and contributed towards achieving the objectives of this course.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd