102k views
4 votes
Match the string member function name to its description.

strip
change
uppercase
split
lower
Descriptions:
A. Remove whitespace (or other characters) from a string.
B. Separate a string into a list of parts.
C. Only changes uppercase characters in a string.
D. Not a real string member function.
Select the correct matching of function names to their descriptions:
a. 1A, 2B, 3C, 4D, 5E
b. 1B, 2C, 3D, 4E, 5A
c. 1A, 2B, 3C, 4D
d. 1D, 2C, 3B, 4A, 5E

User Rysqui
by
8.0k points

1 Answer

4 votes

Final answer:

The correct match of function names to their descriptions for a programming language like Python is: strip - Remove whitespace or other characters, split - Separate into parts, upper - Change to uppercase, change is not a real function, and lower - Change to lowercase.

Step-by-step explanation:

The student is trying to match string member function names with their correct descriptions in a programming context, likely within the scope of Python or a similar language. Here's the correct matching:

  1. strip: Remove whitespace (or other characters) from a string.
  2. split: Separate a string into a list of parts.
  3. upper: Only changes uppercase characters in a string.
  4. change: Not a real string member function.
  5. lower: Changes uppercase characters in a string to lowercase.

Therefore, the correct answer is option (a): 1A, 2B, 3C, 4D, 5E.

User Luzett
by
7.8k points