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 : 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 namedeptRobert 'Mechanical'
output ROME
Points
SUBMIT functionname.m FILE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
