Two coding challenges this week!
Part 1: Estimate the value of e.
e is defined as  as n goes to infinity. So the largerthe value of n, the closer you should get to e.
math.e is defined as 2.718281828459045
You'll write a program that uses a while loop to estimate e towithin some defined error range, while having a limit on how manyiterations it will attempt.
Part 2: Palindrome detection
A palindrome is a string that is the same forwards andbackwards.
Madam I'm Adam
Racecar
Was it a cat I saw?
There are many sophisticated ways of detecting palindromes. Someare surprisingly simple (s == s[::-1])
You will use a for loop to iterate over the contents of thestring to determine if it is a palindrome.
Beware! There are many solutions online. Don't fall prey tolooking this one up. It's not as hard as it looks. Draw it out onpaper first and think through how you index the string from bothends.