Cody

# Problem 146. Tune your guitar

Solution 653944

Submitted on 16 Apr 2015 by nhagen
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% x = 'E4'; y_correct = 330; assert(isequal(tune(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In tune (line 2) In evaluateCode', '/users/mss.system.J03mN6/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

2   Pass
%% x = 'B3'; y_correct = 247; assert(isequal(tune(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In tune (line 2) In evaluateCode', '/users/mss.system.J03mN6/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

3   Pass
%% x = 'G3'; y_correct = 196; assert(isequal(tune(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In tune (line 2) In evaluateCode', '/users/mss.system.J03mN6/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

4   Pass
%% x = 'D3'; y_correct = 147; assert(isequal(tune(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In tune (line 2) In evaluateCode', '/users/mss.system.J03mN6/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

5   Pass
%% x = 'A2'; y_correct = 110; assert(isequal(tune(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In tune (line 2) In evaluateCode', '/users/mss.system.J03mN6/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]

6   Pass
%% x = 'E2'; y_correct = 82; assert(isequal(tune(x),y_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] [> In tune (line 2) In evaluateCode', '/users/mss.system.J03mN6/+cody/verifyCode.m', 238)" style="font-weight:bold">cody.verifyCode>evaluateCode (line 238) In cody.verifyCode (line 43) In mls.internal.fevalJSON (line 14)]