[SOLVED] CSCI1300/1310-Quiz 6

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Quiz6-5zbndr.zip (0.6 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Write a function that takes two integers as inputs, where the first integer is the numerator and the second is the denominator.  The function should do the following:

If the denominator divides evenly into the numerator, return the

string “clean divisor”

If the denominator doesn’t divide evenly into the numerator, return

the string “dirty divisor”

If the denominator is 0 and the numerator is nonzero, return the

string “cannot divide by zero”

If the denominator and the numerator are both zero, return the string

“0/0 is not defined”

Use the following function definition: def theDivider(num, den):

Examples:

theDivider(14, 7) returns “clean divisor” theDivider(12, 9) returns “dirty divisor” theDivider(9, 0) returns “cannot divide by zero” theDivider(0, 0) returns “0/0 is not defined

  • Quiz6-5zbndr.zip