print(' have thought up number you have % guesses to get it (maxguess) numguesses while numguesses <maxguess guess ' while len(guess!numdigits or not isonlydigits(guess) print('guess #% (numguesses) guess input( clue getclues(guesssecretnum print(clue numguesses + if guess =secretnum break if numguesses maxguess print('you ran out of guesses the answer was % (secretnum) if not playagain() break designing the program the flow chart in figure - describes what happens in this gameand in what order they can happen how the code works import random def getsecretnum(numdigits) returns string that is numdigits longmade up of unique random digits at the start of the programimport the random module then define function named getsecretnum(the function makes secret number that has only unique digits in it instead of only -digit secret numbersthe numdigits parameter lets the function make secret number with any number of digits for exampleyou can make secret number of four or six digits by passing or for numdigits post questions to