Question Answered step-by-step Please help fill in the #TODOs with lines of codes based on the… Please help fill in the #TODOs with lines of codes based on the direction below (PYTHON) Image transcription textl # This method checks whether aninput string, username, contains both atleast one letter and at lea… Show more… Show moreImage transcription text30 # Check if the conditions aresatisfied, and return True or Falseaccordingly 31 if # TODO … Show more… Show more For this program, you will create a program that prompts a user to enter a username. If the username they enter is valid according to the conditions below, then it prints a success message. Else, it prompts the user again to enter a valid username. In order for a username to be valid, it must:Not already exist in the list of usernamesContain at least 1 letter and 1 numberYou will write two functions to determine whether the username entered is valid:letter_and_number: This function has one parameter, a String called username, and returns a Boolean value for whether the input username contains at least 1 letter and 1 number. We have already given you scaffolding for this function, but you need to complete the following to finish the function:TODO #1: Complete the function header to take in the single parameter, usernameTODO #2: Complete the if statement to return False if the string is emptyTODO #3: Complete the while condition according to the commentsTODO #4: Complete the first if condition inside the while loop — when should we set has_letter to True?TODO #5: Complete the elif condition inside the while loop — when should we set has_number to True?TODO #6: Write the if/else statement at the end of the while loop as described in the commentsTODO #7: Complete the if statement at the end of the function — when should we return True?Hint for TODO #4-5: consider which Python string functions may be helpful for determining whether a character is alphabetical or a digitis_unique: You will compose this entire function, which takes as input 2 parameters: a string, username, and a list, usernames_list (a list of strings representing the current list of existing usernames). The function returns a Boolean value: True if the input username is unique (does not already exist in the list), or False if it already exists. Note: You must use the Python list function count() in this function Computer Science Engineering & Technology Python Programming CSE 8a Share QuestionEmailCopy link Comments (0)