Cody

Solution 125455

Submitted on 9 Aug 2012 by Óscar
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
%% a = 1; b = 2; c_correct = 3; assert(isequal(add_two_numbers(a,b),c_correct))

add_two_numbers.m +cody Shared add_two_numbers_testsuite.m Published test.m {Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/license.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/graphicsAndGuis/uicontrol.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/home.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/keyboard.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/more.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/pause.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} 3

2   Pass
%% a = 17; b = 2; c_correct = 19; assert(isequal(add_two_numbers(a,b),c_correct))

add_two_numbers.m +cody Shared add_two_numbers_testsuite.m Published test.m {Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/license.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/graphicsAndGuis/uicontrol.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/home.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/keyboard.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/more.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/pause.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} 3

3   Pass
%% a = -5; b = 2; c_correct = -3; assert(isequal(add_two_numbers(a,b),c_correct))

add_two_numbers.m +cody Shared add_two_numbers_testsuite.m Published test.m {Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/license.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/web_common/shadow/graphicsAndGuis/uicontrol.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/home.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/keyboard.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/more.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} {Warning: Function /opt/mlsedu/mdcsserver/latest/m/common/shadow/pause.m has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.} {> In path at 34 In add_two_numbers at 8 In verifyCode>evaluateCode at 189 In verifyCode at 37 In fevalJSON at 14} 3

Suggested Problems

More from this Author95