Question: Bellow there is a partial implementation for the function getCount. This function takes 2 pcs integers, digit and num and retums the number of times

 Bellow there is a partial implementation for the function getCount. This

Bellow there is a partial implementation for the function getCount. This function takes 2 pcs integers, digit and num and retums the number of times digit appears innum. For me getCount(5, 102548755) returns 3 because 5 appears 3 times in 102548755. If ime does not display, click here Preconditions: digit and num are always integers greater than 1 def getCount(digit, num): 2 total = 0 3 while num > O: 4. if # [a] 5 total = # [6] num = num // 10 return total No 2 w NP Which of the following could fill in the blanks for [a] and [b] to correctly implement getCount? You must select two choices, one for (a) (highlighted in green) and one for [b] (highlighted in purple) For (a): num % digit > 0 For [b]: total + num % 10 For [b]: total + digit For [b]: num % 10 Foraj: num == digit

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