Question: Your function should have five input arguments, in this order: the value of the torque ( a number ) , the current unit of force
Your function should have five input arguments, in this order: the value of the torque a
number the current unit of force a string the current unit of length a string the desired unit
of force a string and the desired unit of length a string For example, when converting
lbft to Nm the input arguments to your function would be:
convertTorquelbftNm
The function should return two values in this order: a number indicating success or failure
and the value of the converted torque. For example, when converting lbft to Nm the
function should return the following two values: and Conversely, if the function is
provided with invalid input, such as an invalid unit of measure, the function should return and
For example, when converting lbft to ftft the function should return the following two
values: and
The function should be able to handle four units of length: ft in mm and m It should also be
able to handle four units of force: N lb oz and kN You should perform the conversion using
conditional statements. You may find it convenient to use switch statements.
The function should properly handle invalid input by returning a success value of
Hints: Use double quotes for all strings. Dont use single quotes.
Welldocumented means: put lots of comments in your code to explain what is going on
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
