Question: Please use Scheme language Question 3 a. 15 marks Write a procedure called (palindrome? 8) that takes a strings as argument and returns true (0)
Question 3 a. 15 marks Write a procedure called (palindrome? 8) that takes a strings as argument and returns true (0) if sis palindrome. b. 17 marks) Ak-palindrome is a string that can be made into a palindrome by ignoring up to k characters. Write a procedure called (k-palindrome? a strings and a non-negative integer k as arguments and returns true if sis a k-palindrome. For example, k) that takes (k-palindrome?"tancoheat 2) (k-palindrome?"tahcoheat1) - #t You may find the following built-in procedures useful for the above problems: . (string-length ste) - returns the number of characters in a given string . (string-ref str i) - returns the character at a specified index in a given string . (subatring str start fond]) returns a substring of a given string between two indices (the ending index is optional). Question 3 a. 15 marks Write a procedure called (palindrome? 8) that takes a strings as argument and returns true (0) if sis palindrome. b. 17 marks) Ak-palindrome is a string that can be made into a palindrome by ignoring up to k characters. Write a procedure called (k-palindrome? a strings and a non-negative integer k as arguments and returns true if sis a k-palindrome. For example, k) that takes (k-palindrome?"tancoheat 2) (k-palindrome?"tahcoheat1) - #t You may find the following built-in procedures useful for the above problems: . (string-length ste) - returns the number of characters in a given string . (string-ref str i) - returns the character at a specified index in a given string . (subatring str start fond]) returns a substring of a given string between two indices (the ending index is optional)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
