Question: The function isFactor accepts two arguments num 1 and num 2 . Write code in the function that does the following: Checks that both num

The function isFactor accepts two arguments num1 and num2. Write code in the function that does the following:
Checks that both num1 and num2 are numbers (int or float).
Return the string badargs if one or both arguments are not numbers.
Otherwise, divide num1 by num2.
If the remainder is 0:
The function returns True
Otherwise:
The function returns False.
While you may use the type function to test for the argument type, the isinstance function is a better approach.

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 Programming Questions!