Ask Question

count multiples (num1, num2, AND) Description: Returns the number of multiples of N that exist between num1 and num2 inclusive. Parameters: num1 (int), num2 (int), N (int). num1 and num2 can be in any order. N cannot be 0. Return value: int Examples: count multiples (2, 13, 3) → 4 count_multiples (17, - 5, 4) → 6 count_multiples (-10, - 5, - 3) → 2

+5
Answers (1)
  1. 5 November, 22:27
    0
    def count_mutiples (num1, num2, N) : #make function for call

    count=0

    if (num1>num2) : #that will check which number is low and high

    low=num2

    high=num1

    else:

    high=num2

    low=num1

    for i in range (low, high+1):

    if (i%N==0):

    count=count+1

    return (count)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “count multiples (num1, num2, AND) Description: Returns the number of multiples of N that exist between num1 and num2 inclusive. Parameters: ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers