Question: Write the Python code for the function getEvenCountinum, where rum is an integer. The function returns the number of even-valued digits in num. 0,2,4,6, and

 Write the Python code for the function getEvenCountinum, where rum is

Write the Python code for the function getEvenCountinum, where rum is an integer. The function returns the number of even-valued digits in num. 0,2,4,6, and 8 ze even digts. Yous ze not allowed to use str(num), lists or tuples. The argument num is guaranteed to be an integer only, so num// 10 will not behave as you expect it when num is negative. 145110 - 14 but 145/10 returns -15. Make sure your code code handles negative numbers correctly. You cannot use recursion Examples: getEvenCount(937825172500016) returns 7 getEvenCount(11351) returns 0 getEvenCount(-527888123) returns 5

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!