Cody

Problem 44812. Draw Dominos

Solution 2628748

Submitted on 29 Jun 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
dp = draw_dominos([0,0]); da = [' | '; ' | '; ' | ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test1 (line 1) dp = draw_dominos([0,0]);

2   Fail
dp = draw_dominos([1,2]); da = [' | o '; ' o | '; ' | o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test2 (line 1) dp = draw_dominos([1,2]);

3   Fail
dp = draw_dominos([3,4]); da = [' o | o o '; ' o | '; ' o | o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test3 (line 1) dp = draw_dominos([3,4]);

4   Fail
dp = draw_dominos([5,6]); da = [' o o | o o o '; ' o | '; ' o o | o o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test4 (line 1) dp = draw_dominos([5,6]);

5   Fail
dp = draw_dominos([7,8]); da = [' o o o | o o o '; ' o | o o '; ' o o o | o o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test5 (line 1) dp = draw_dominos([7,8]);

6   Fail
dp = draw_dominos([9,9]); da = [' o o o | o o o '; ' o o o | o o o '; ' o o o | o o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test6 (line 1) dp = draw_dominos([9,9]);

7   Fail
dp = draw_dominos([3,7]); da = [' o | o o o '; ' o | o '; ' o | o o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test7 (line 1) dp = draw_dominos([3,7]);

8   Fail
dp = draw_dominos([7,3]); da = [' o o o | o '; ' o | o '; ' o o o | o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test8 (line 1) dp = draw_dominos([7,3]);

9   Fail
dp = draw_dominos([5,5]); da = [' o o | o o '; ' o | o '; ' o o | o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test9 (line 1) dp = draw_dominos([5,5]);

10   Fail
dp = draw_dominos([1,8]); da = [' | o o o '; ' o | o o '; ' | o o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test10 (line 1) dp = draw_dominos([1,8]);

11   Fail
dp = draw_dominos([6,4]); da = [' o o o | o o '; ' | '; ' o o o | o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test11 (line 1) dp = draw_dominos([6,4]);

12   Fail
dp = draw_dominos([4,2]); da = [' o o | o '; ' | '; ' o o | o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test12 (line 1) dp = draw_dominos([4,2]);

13   Fail
dp = draw_dominos([2,5]); da = [' o | o o '; ' | o '; ' o | o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test13 (line 1) dp = draw_dominos([2,5]);

14   Fail
dp = draw_dominos([9,0]); da = [' o o o | '; ' o o o | '; ' o o o | ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test14 (line 1) dp = draw_dominos([9,0]);

15   Fail
dp = draw_dominos([8,7]); da = [' o o o | o o o '; ' o o | o '; ' o o o | o o o ';]; assert(strcmp(dp,da))

Error:File: draw_dominos.m Line: 4 Column: 6 Identifier 'cc' is not a function or a shared variable. To share 'cc' with nested function, initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested Functions. Error in Test15 (line 1) dp = draw_dominos([8,7]);

Suggested Problems

More from this Author139

Community Treasure Hunt

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

Start Hunting!