Create a class called palindrome

Assignment Help Python Programming
Reference no: EM132100015

Please see question on Classes in Python. This question tests your ability to manipulate strings. A palindromic word is one that reads the same backwards as forwards.

Hence the words hello and peel are not palindromes, but the words peep, deed and dad are palindromes.

(a) Create a class called Palindrome.

(b) In your Palindrome class, create a method called reverse() which takes a string argument. Your method should return the reverse of the argument as a string. For example, if the argument is ‘‘Foobar'' then your method should return ‘‘rabooF''.

(c) Create a second method in Palindrome called isPalindrome() which takes a string argument. This method should return True if the argument is a palindrome and False otherwise.

(d) Write some code to test your new Palindrome class and print out results of your testing to the user. Give some consideration to what sort of strings you might want to use for your testing.

Reference no: EM132100015

Questions Cloud

Lymph nodes and the spleen : What structural similarities are there between the lymph nodes and the spleen?
The development of a large-scale software system : In any team, which is responsible for the development of a large-scale software system such as a passport management portal.
Successful participation in the discussion board : Successful participation in the discussion board requires one substantial posting.
Control the functionality of a body system : How can something as simple as an electrolyte control the functionality of a body system?"
Create a class called palindrome : Create a class called Palindrome. In your Palindrome class, create a method called reverse() which takes a string argument.
Shoulder extension and elbow extension : Which muscle are the primary movers for shoulder extension and elbow extension?
Lidocaine block sodium ion channels in neurons plasma : Local anesthetic drugs such as lidocaine block sodium ion channels in neurons plasma membrane from opening.
Calculate the average grade : Modify the below code so that it uses custom functions to add grades to the array, print the grades entered, calculate the average grade.
Write a python function square_all that takes one parameter : Write a python function square_all that takes one parameter, a nested list of integers, and returns a new nested list.

Reviews

Write a Review

Python Programming Questions & Answers

  A python program that takes a value from a user and store

You need help writing a Python program that takes a value from a user and stores it in the registry.

  Write a program that reads the name of a data file

Write a program that reads the name of a data file which contains student ids (such as c1234500) and their scores. The program will find and print the average score, the number of students processed.

  Write a python program that performs simple encryption

You are required to write a Python program that performs simple encryption and decryption on strings entered by the user. To do so, you are to use one of the simplest and most widely known encryption techniques known as the Caesar Cipher

  How does the given change your programming capabilities

CS 192- Considering the lessons on menu logic and the use of arrays and loops, how does this change your programming capabilities? What kind of programs can you now create utilizing these powerful programming tools?

  Write a function digitize that takes two parameters

Write a function digitize (using loops) that takes two parameters: one integer parameter and one bool parameter.

  Practical laboratory exercises to automate business process

ITECH1100 Understanding the Digital Revolution - Story Resurrection - you will use skills acquired through practical laboratory exercises

  Create a given artisan 3D pancake

How many cubic units of batter (to some given degree of accuracy) is required to create a given artisan 3D pancake defined by a given blueprint

  Write a Python script for the ice cream ordering system

Assignment: Below Zero - ice cream store. In this first part of Task, you should write a Python script for the ice cream ordering system

  Student record due smartsite thursday 1211 1155 pm file

due smartsite thursday 1211 1155 p.m. file names grading.py ltbrgtall prompts for input and all output must match my

  Write a program based on the given program skeleton

The calculate function would calculate the net wages, and display all information such as wage before tax, taxes, and wage after taxes.

  Write the pseudo code and then code it in python

Write the pseudo code and then code it in Python. Write a function that has number of tosses as an input parameter. As usual, screen copy your code and results.

  Assume that the variables gpa , deanslist and studentname

Assume that the variables gpa , deansList and studentName , have been initialized. Write a statement that adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

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