Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 240285

Submitted on 5 May 2013 by Yaroslav

Correct

17Size
Leading solution size is 17.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
assert(love_calculator('Jay-Z','Beyonce')==5)

                    
2
Pass
 
%%
assert(love_calculator('Dr. Dre','Eminem')==47)

                    
3
Pass
 
%%
assert(love_calculator('Angelina Jolie','Brad Pitt')==69)

                    
4
Pass
 
%%
assert(love_calculator('Jennifer Aniston','Brad Pitt')==75)

                    
5
Pass
 
%%
assert(love_calculator('God','Satan')==82)

                    
6
Pass
 
%%
assert(love_calculator('Your Mom','Your Dad')==5)

                    
7
Pass
 
%%
assert(love_calculator('@bmtran','MATLAB')==66)