In Assignment 6 we will get some practice developing some simple recursive algorithms in python. They are: sumInts(n) returns the sum of the first n positive integers1....n pow(x,y) will raise some...

1 answer below »

In Assignment 6 we will get some practice developing some simple recursive algorithms in python. They are:

















sumInts(n)returns the sum of the first n positive integers1....n
pow(x,y)will raise some numberxto the powery, returningxy
isPalindrome(phrase)will check to see ifphraseis a palindrome, returningTrueorFalse


The purpose of this assignment is to solve these problems recursively. A loop-based solution will be worth very little. For each, think about the smaller problem, and how you can use a solution to the smaller problem to find the solution for the larger problem.


Rubric for this assignment:



  • For each algorithm

    • Is it recursive?

    • Is the base case correct?

    • Does the size of the problem shrink with each recursive call?



  • 25 each forsumInts&pow, 40 points forisPalindrome

  • 10 points for a well-documented program

  • 10 bonus points ifisPalindromecan handle phrases with mixed case, spaces and punctuation (e.g., "Draw, O coward!")



Answered Same DayApr 13, 2022

Answer To: In Assignment 6 we will get some practice developing some simple recursive algorithms in python....

Kshitij answered on Apr 14 2022
96 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here