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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started