In this toupper code snippet we added the If Statement to check whether the character is between ‘A’ and ‘Z’ using isalpha function. If the condition is True, it will convert the given character to Uppercase using below statement