Cody

Solution 2119589

Submitted on 5 Feb 2020
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   Fail
rate = [2,5,4]; price = [8,3,1]; y_correct = 3360; assert(isequal(earnings(rate,price),3360))

Error in solution: Line: 2 Column: 12 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

2   Fail
rate = [1,4]; price = [2,1]; y_correct = 576; assert(isequal(earnings(rate,price),576))

Error in solution: Line: 2 Column: 12 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.

3   Fail
rate = [6 6 2 3 2 8]; price = [3 2 4 8 9 5]; y_correct = 11520; assert(isequal(earnings(rate,price),11520))

Error in solution: Line: 2 Column: 12 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.