Challenge yourself

Beginner
Intermediate
Expert

Write a function which takes two strings as argument, s and method.

  - If method is "lower", it returns lowercase version of the s.
  - If method is "upper", it returns uppercase version of the s.
  - If method is "capitalize", it returns capitalized version of the s.
  - It returns s as it is otherwise.