Question: Programming Problem 1 0 Due date: Friday, October 0 4 , 2 0 2 4 at 9 pm Write a Python function that does the
Programming Problem
Due date: Friday, October at pm
Write a Python function that does the following:
Its name is reversestring
It takes one string as argument
Using a while loop, it builds a new string that is the reverse of the original string
It returns the reversed string
Write a Python function that does the following:
Its name is removespaces
It takes one string as argument
Using a while loop to create a string with no spaces
Return the news string with no spaces
Write a Python function that does the following:
Its name is ispalindrome
It takes one string as argument
It checks whether the string is a palindrome. A Palindrome reads the same backward and forward. For example: madam, and nurses run
It returns True if the string is a palindrome, and False otherwise
Use your removespaces function to remove spaces from the argument before you check if the string is a palindrome
Use your reversestring function to reverse the string and then compare the result to the original string
Name the program palindrome.py Make sure that gradescope gives you the points for passing the test cases.
def main:
print reversestringaeiou # uoiea
print removespacesae io ua # aeioua
print ispalindromenoon # True
print ispalindromedeified # True
print ispalindromego deliver a dare vile dog" # True
main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
