want a python code.
def double_until_all_digits(n, giveup = 1000): Given a positive integer n, keep multiplying it by two until the current number contains all of the digits 0 to 9 at least once. Return the number of doublings that were necessary to reach this goal. If the number has been multiplied giveup times without reaching this goal, the function should give up and return -1. giveup Expected result 1000 1234567890 1000 555 10 Show transcribed image text def double_until_all_digits(n, giveup = 1000): Given a positive integer n, keep multiplying it by two until the current number contains all of the digits 0 to 9 at least once. Return the number of doublings that were necessary to reach this goal. If the number has been multiplied giveup times without reaching this goal, the function should give up and return -1. giveup Expected result 1000 1234567890 1000 555 10
Expert Answer
Answer to def double_until_all_digits(n, giveup = 1000): Given a positive integer n, keep multiplying it by two until the current …