This function receives a string s and a number n which descr

This function receives a string s and a number n which describes the number of parenthesis to place on the left and right of the old string to form a new string that should be returned. Use iteration to solve this! in python

Solution

you don\'t technically need iteration to solve this problem... but your instructor clearly wants an iterative solution.

So basically you need to think about the basic \"unit\" of the problem, and how many times to do it. Adding eight parentheses is the same as adding a single parenthesis eight times in succession.

This function receives a string s and a number n which describes the number of parenthesis to place on the left and right of the old string to form a new string

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site