Pseudocode Task

Hint: This pseudocode processes two input words, combines them, converts the result to lowercase, and then prints the combined word, its first character, and its length, unless the combined word is empty.

FUNCTION process_words(word1, word2):
    // Combine the two input words
    combined_word = word1 + word2
 
    // Convert the combined word to lowercase
    lower_combined_word = TO_LOWERCASE(combined_word)
 
    // Get the length of the lowercase word
    length_of_word = LENGTH(lower_combined_word)
 
    // Check if the resulting word has any characters
    IF length_of_word > 0:
        // If it has characters, get the first one (at index 0)
        first_char = lower_combined_word[0]
 
        // Print the results
        PRINT("Combined and Lowercase: ", lower_combined_word)
        PRINT("First character: ", first_char)
        PRINT("Length: ", length_of_word)
    ELSE:
        // If the word is empty, print a message indicating that
        PRINT("Resulting word is empty.")
    END IF
END FUNCTION