Question: ( python ) Task 1 : Check palindrome define a function named isPalindrome which takes a string as parameter, it checks the string and returns

(python) Task1: Check palindrome
define a function named isPalindrome which takes a string as parameter, it checks the string and returns true if it reads the same forwards as backwards
In your main.py, you need to test the following strings and output the correct boolean value for each
Test cases:
isPalindrome("madam") isPalindrome("racecar") isPalindrome(Python") isPalindrome("rotater") isPalindrome("byebye") isPalindrome("notion")
Task 2: Base_converter
In the lecture of recursion, there is a problem and solution "PrintBinary" which converts a decimal value into a string of binary number, please reference this example and define a recursive funtion named Base_converter(n, base), which takes two parameters n is decimal value, base will indicate the number it will convert.
If base is 2, the function will print its binary number
If base is 8, the function will print its octal number
If base is 16, the function will print its hex number
In the main. py, you will use the recursive function to convert
1345,6789,24540 into the binary, octal and hexdecimal numbers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!