Cody

Problem 42377. Bouncy numbers

Solution 2243382

Submitted on 29 Apr 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
x = 0.01; y_correct = 102; assert(isequal(bouncy_numbers(x),y_correct))

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

2   Fail
x = 0.05; y_correct = 106; assert(isequal(bouncy_numbers(x),y_correct))

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

3   Fail
x = 0.1; y_correct = 132; assert(isequal(bouncy_numbers(x),y_correct))

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

4   Fail
x = 0.2; y_correct = 175; assert(isequal(bouncy_numbers(x),y_correct))

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

5   Fail
x = 0.5; y_correct = 538; assert(isequal(bouncy_numbers(x),y_correct))

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

6   Fail
x = 0.8; y_correct = 4770; assert(isequal(bouncy_numbers(x),y_correct))

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

7   Fail
x = 0.9; y_correct = 21780; assert(isequal(bouncy_numbers(x),y_correct))

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

8   Fail
x = 0.95; y_correct = 63720; assert(isequal(bouncy_numbers(x),y_correct))

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

9   Fail
x = 0.96; y_correct = 152975; assert(isequal(bouncy_numbers(x),y_correct))

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

10   Fail
x = 0.97; y_correct = 208200; assert(isequal(bouncy_numbers(x),y_correct))

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

11   Fail
x = 0.98; y_correct = 377650; assert(isequal(bouncy_numbers(x),y_correct))

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


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!