Skip to main content

Accenture

Accenture OA-15 2024

Problem Description

Your friend has made an entry of a name in the form of first name F and last name L in your contact list. However, some letters in the names are in uppercase while others are in lowercase. Your task is to format the names such that the first name is in lowercase and the last name is in uppercase.

Input Format:

  • input1: A string F, representing the first name.
  • input2: A string L, representing the last name.

Output Format:

Return a string representing the formatted name with the first name in lowercase and the last name in uppercase.

Constraints:

  • 1≤Length of F≤100: The length of the first name string.
  • The string F may contain uppercase and lowercase English letters only.
  • 1≤Length of L≤100: The length of the last name string.
  • The string L may contain uppercase and lowercase English letters only.

Example

Sample Input:

F = "RaM"
L = "kUMAR"

Sample Output:

ram KUMAR

Explanation:
The first name "RaM" is converted to lowercase "ram", and the last name "kUMAR" is converted to uppercase "KUMAR". The formatted name is "ram KUMAR".