Question: ( python ) Task 1 : Check palindrome define a function named isPalindrome which takes a string as parameter, it checks the string and returns
python Task: 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:
isPalindromemadam isPalindromeracecar isPalindromePython isPalindromerotater isPalindromebyebye isPalindromenotion
Task : Baseconverter
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 Baseconvertern base which takes two parameters n is decimal value, base will indicate the number it will convert.
If base is the function will print its binary number
If base is the function will print its octal number
If base is the function will print its hex number
In the main. py you will use the recursive function to convert
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
