#This function will receive as an input a string and return the same string in uppercase.def myupper(str):returnstr.upper()#This function will receive as an input a string and return the same string in lowercase.def mylower(str):returnstr.lower()#This function will receive as an input a string and if the string is in uppercase, it will return the same string as lowercase. If the string is in lowercase it will return the same string in uppercase.def invertsizing(str):if(str.lower() ==str):returnstr.upper()else:returnstr.lower() def stringpart(st,n):return st[0 : n]