Complete the code to convert the string to uppercase.
text = "hello" result = text.[1]
The upcase method converts all letters in the string to uppercase.
Complete the code to remove spaces from the start and end of the string.
text = " hello " result = text.[1]
The strip method removes spaces from both the start and end of the string.
Fix the error in the code to convert the string to lowercase.
text = "HELLO" result = text.[1]
The downcase method converts all letters in the string to lowercase.
Fill both blanks to convert the string to lowercase and remove spaces.
text = " HeLLo " result = text.[1].[2]
First, downcase converts all letters to lowercase, then strip removes spaces from both ends.
Fill all three blanks to convert the string to uppercase, remove spaces, and then lowercase it.
text = " HeLLo " result = text.[1].[2].[3]
capitalize instead of upcase or downcase.The string is first converted to uppercase with upcase, then spaces are removed with strip, and finally converted to lowercase with downcase.