Question: Use Python 3 or higher Question 6: One method to determine if an integer is a multiple of 9 is to sum the individual digits,

Use Python 3 or higher
Question 6: One method to determine if an integer is a multiple of 9 is to sum the individual digits, then continue to sum the resulting values until you have a one-digit result. For example, the integer 1863 can be verified as a multiple of 9 by adding the digits (1 +8+6+3 18), then adding the digits of the resulting value (1+8-9). Since the final single digit answer is 9, then we know that the starting value was an even multiple of 9. Define a function named q60 that accepts an integer as a parameter, then (using only string manipulation and integer addition), creates a list of all the values obtained by adding the digits together until arriving at a single digit final answer. The function should return the list of resulting values. If the parameter string does not contain only digits, the function should return an empty list. Example output of function q60 at the interactive Python prompt: 0 >>>q6 'BobDoesn't contain digits, returns empty list 9 >>>a6 ('39 12, 3 > q 6('9267304815') 45, 9 NOTE: Your q60 function should return only the list of values; it should not print anything
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
