Question: def findFunctParen(self,expr): # expr = arithmetic expression without a space # Find a miminal substring including a function name # and the following pair of

def findFunctParen(self,expr): # expr = arithmetic expression without a space # Find a miminal substring including a function name # and the following pair of parenthese # Return # 1st value = function name or None if N/A # 2nd value = the start position of the substring, or None if N/A # 3rd value = the end position of the substring, or None if N/A # # e.g. # s = "2*sin(2*pi)" --> returns 5, 10, "sin" # s = "2*32*(2*pi)" --> returns 5, 10, None # s = "2*32/8/4/2" --> returns None, None, None #functions can be sqrt, exp,sin,cos,tan,ln,lg and round

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!