Write a function that meets these requirements

Assignment Help Business Management
Reference no: EM132238656

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: EM132238656

Questions Cloud

Discuss reasons why it is important to plan : Discuss reasons why it is important to plan in advance of starting an EHR vendor selection process?
Cis406 java programming i : A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To account for the difference in time
What important factors would you want your program to do : Merit pay is often referred as pay for performance and is the most widely-used method organizations use to determine employee pay increases.
Difference between a physical and virtual entity : What is the difference between a physical and virtual entity?
Write a function that meets these requirements : An palindrome is a word that's the same when you reverse the letters.
How are the measures used in the performance scorecard : How are the measures used in the performance scorecard at Citibank linked to business strategy implementation? What should Lisa Johnson and Frits Seegers.
Steps involved in staff performance appraisal process : What role change management can play in leadership and performance, management? Describe the steps involved in staff performance appraisal process.
Integrity and referential integrity important in a database : What does it mean to say that a database displays both entity integrity and referential integrity?
Staff appraisal during the project implementation phase : Discuss the advantages of performing staff appraisal during the project implementation phase.

Reviews

Write a Review

Business Management Questions & Answers

  Contribution benefit pension programs

Compare and contrast the major features of defined benefit and defined contribution benefit pension programs.

  Models and the tools for connecting and communicating

Using what you have learned about e-business models and the tools for connecting and communicating, list six companies and describe what their revenue model is and what their e-business model is.  Creating a list is sufficient for this activity.

  What is a human resource plan

What is a human resource plan? Which enterprise environmental factors influence the development of a human resource plan?

  Identify the strategic planning outcomes

Identify the strategic planning outcomes. Keep in mind that the outcomes should be specific and measurable. Describe the key components

  What does it mean to obtain the cross rate

What does it mean to obtain the cross rate for two currencies? Why would one want to obtain the cross rate for two currencies?

  Steps in the communication process

1. Use the Internet to find a source that discusses the communication process. What are the steps in the communication process? 2. What do you think is the relationship between diversity and communication styles? Provide an example.

  Examine potential security risks data breaches

Examine potential security risks, data breaches. Evaluate the level of efficiency of the technology implementation. Develop business requirements.

  Explain how you will implement the decision made

Define the problem in the scenario that you have chosen. Analyze the problem in the scenario. Generate options for solving the problem in the scenario.

  Thoughts on marketing premium products

Post a brief statement that expresses your thoughts on marketing premium products. The length of your response(s) should be a minimum of 150 words.

  Medical group practice administrators

Predict two (2) external and / or internal challenges facing today's medical group practice administrators. Compose a strategy to manage the challenges

  President cut taxes to shrink the budget deficit

Suppose Congress and the president cut taxes to shrink the budget deficit. Use the AD/AS model to illustrate and discuss the impact on inflation and real GDP

  Wages and salaries for professional workers

Explain why the wages and salaries for professional workers (accountants, doctors, and business managers) and for skilled trades

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