findseriessum

CF

function findSeriesSum

The function/method findSeriesSum accepts an argument str representing a string value. The string str contains a series of integers but some…