[Solved] CSCI1300/1310-Quiz 6

$25

File Name: CSCI1300/1310-Quiz_6.zip
File Size: 188.4 KB

SKU: [Solved] CSCI1300/1310-Quiz 6 Category: Tag:
5/5 - (1 vote)

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 doesnt 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

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCI1300/1310-Quiz 6
$25