""" Program 1 (80 points): A website has the following rules for creating a valid user name: The first and last characters must be different No digits are allowed The allowed length is between 5 and 10 characters Write a function valid_user_name that takes one string parameter. The function should return True, if the parameter is a valid user name and False otherwise. Write a program that first reads the number of users, then generates a list of strings from user input (use this function Links to an external site.). The program uses the function valid_user_name and creates two new lists: list of valid user names and list of invalid user names. The program prints both lists and finds the number of valid and invalid user names. """ def valid_user_name(str): size=len(str) if(size < 5 or size > 10): return False cond1=(str[0]!=str[-1]) if(cond1==False): return False count_digit=0 for item in str: if(item.isdigit()): count_digit+=1 if(count_digit>0): return False else: return True def make_list_string(size): #this function creates a list of strings from user input my_list=[] for i in range(size): new_str = input("enter string ") my_list.append(new_str) return my_list def main(): size=int(input("enter size ")) list=make_list_string(size) valid=[] non_valid=[] for item in list: if(valid_user_name(item)): valid.append(item) else: non_valid.append(item) print(valid) print(non_valid) main()