Question: Problem 3 : Create a function that takes two strings as input: a name and a department. The function should generate a code using the

Problem 3: Create a function that takes two strings as input: a name and a department. The
function should generate a code using the following format:
Take the first two letters of the name.
Determine the length of the name.
Take the first two letters of the department.
Combine these components into a single code, converting all letters to uppercase.
FOR EXAMPLE:
>> output = namedept('Robert', 'Mechanical')
>>output ='RO6ME'
(25 Points)
% SUBMIT function_name.m FILE

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!