Question: Using this built-in function: len(s) returns the length of string s. Define a function named 'lengthProduct' which will be called with two arguments(you can assume
Using this built-in function: len(s) returns the length of string s.
Define a function named 'lengthProduct' which will be called with two arguments(you can assume that it will be called only using string values), and which returns the product of the lengths of the strings passed in.
This is the example of question:
lengthProduct("firefly", "class") must return 35(since the length of "firely" is 7, the length of "class" is 5, and 7*5 is 35.)
lengthProduct(" ", "go") must return 0 (since the length of " is 0, the length of "go" is 2, and 0*2 is 0)
This is Python.
Can you help me?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
