Cody

# Problem 27. Pangrams!

Solution 1405893

Submitted on 5 Jan 2018 by Ajay Rawat
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 = 'The quick brown fox jumps over a lazy dog'; y_correct = true; assert(isequal(isPangram(x),y_correct))

a = 't h e q u i c k b r o w n f o x j u m p s o v e r a l a z y d o g' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 32 97 97 98 99 100 101 101 102 103 104 105 106 107 108 109 110 111 111 111 111 112 113 114 114 115 116 Columns 59 through 65 117 117 118 119 120 121 122 a = Columns 1 through 29 97 97 98 99 100 101 101 102 103 104 105 106 107 108 109 110 111 111 111 111 112 113 114 114 115 116 117 117 118 Columns 30 through 33 119 120 121 122 a = Columns 1 through 29 0 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 1 1 Columns 30 through 32 1 1 1 tf = logical 1

2   Pass
x = 'The quick brown fox jumped over a lazy dog'; y_correct = false; assert(isequal(isPangram(x),y_correct))

a = 't h e q u i c k b r o w n f o x j u m p e d o v e r a l a z y d o g' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 32 32 97 97 98 99 100 100 101 101 101 102 103 104 105 106 107 108 109 110 111 111 111 111 112 113 114 Columns 59 through 67 114 116 117 117 118 119 120 121 122 a = Columns 1 through 29 97 97 98 99 100 100 101 101 101 102 103 104 105 106 107 108 109 110 111 111 111 111 112 113 114 114 116 117 117 Columns 30 through 34 118 119 120 121 122 a = Columns 1 through 29 0 1 1 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 0 2 1 0 1 Columns 30 through 33 1 1 1 1 tf = logical 0

3   Pass
x = 'Pack my box with five dozen liquor jugs'; y_correct = true; assert(isequal(isPangram(x),y_correct))

a = 'p a c k m y b o x w i t h f i v e d o z e n l i q u o r j u g s' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 97 98 99 100 101 101 102 103 104 105 105 105 106 107 108 109 110 111 111 111 112 113 114 115 116 117 117 Columns 59 through 63 118 119 120 121 122 a = Columns 1 through 29 97 98 99 100 101 101 102 103 104 105 105 105 106 107 108 109 110 111 111 111 112 113 114 115 116 117 117 118 119 Columns 30 through 32 120 121 122 a = Columns 1 through 29 1 1 1 1 0 1 1 1 1 0 0 1 1 1 1 1 1 0 0 1 1 1 1 1 1 0 1 1 1 Columns 30 through 31 1 1 tf = logical 1

4   Pass
x = 'Pack my box with four dozen liquor jugs'; y_correct = false; assert(isequal(isPangram(x),y_correct))

a = 'p a c k m y b o x w i t h f o u r d o z e n l i q u o r j u g s' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 97 98 99 100 101 102 103 104 105 105 106 107 108 109 110 111 111 111 111 112 113 114 114 115 116 117 117 Columns 59 through 63 117 119 120 121 122 a = Columns 1 through 29 97 98 99 100 101 102 103 104 105 105 106 107 108 109 110 111 111 111 111 112 113 114 114 115 116 117 117 117 119 Columns 30 through 32 120 121 122 a = Columns 1 through 29 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 0 0 1 1 1 0 1 1 1 0 0 2 1 Columns 30 through 31 1 1 tf = logical 0

5   Pass
x = 'Sphinx of black quartz, judge my vow'; y_correct = true; assert(isequal(isPangram(x),y_correct))

a = 's p h i n x o f b l a c k q u a r t z j u d g e m y v o w' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 97 Columns 30 through 57 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 111 112 113 114 115 116 117 117 118 119 120 121 122 a = 97 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 111 112 113 114 115 116 117 117 118 119 120 121 122 a = 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 1 tf = logical 1

6   Pass
x = 'Sphinx of black onyx, judge my vow'; y_correct = false; assert(isequal(isPangram(x),y_correct))

a = 's p h i n x o f b l a c k o n y x j u d g e m y v o w' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 97 98 99 Columns 30 through 53 100 101 102 103 104 105 106 107 108 109 110 110 111 111 111 112 115 117 118 119 120 120 121 121 a = 97 98 99 100 101 102 103 104 105 106 107 108 109 110 110 111 111 111 112 115 117 118 119 120 120 121 121 a = 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 1 3 2 1 1 1 0 1 0 tf = logical 0

7   Pass
x = 'Wonderful watermelon, bringer of life.'; y_correct = false; assert(isequal(isPangram(x),y_correct))

a = 'w o n d e r f u l w a t e r m e l o n b r i n g e r o f l i f e' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 97 98 100 101 101 101 101 101 102 102 102 103 105 105 108 108 108 109 110 110 110 111 111 111 114 114 114 Columns 59 through 63 114 116 117 119 119 a = Columns 1 through 29 97 98 100 101 101 101 101 101 102 102 102 103 105 105 108 108 108 109 110 110 110 111 111 111 114 114 114 114 116 Columns 30 through 32 117 119 119 a = Columns 1 through 29 1 2 1 0 0 0 0 1 0 0 1 2 0 3 0 0 1 1 0 0 1 0 0 3 0 0 0 2 1 Columns 30 through 31 2 0 tf = logical 0

8   Pass
x = 'Dastardly dumpling, harbinger of doom!'; y_correct = false; assert(isequal(isPangram(x),y_correct))

a = 'd a s t a r d l y d u m p l i n g h a r b i n g e r o f d o o m' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 97 97 97 98 100 100 100 100 101 102 103 103 104 105 105 108 108 109 109 110 110 111 111 111 112 114 114 Columns 59 through 63 114 115 116 117 121 a = Columns 1 through 29 97 97 97 98 100 100 100 100 101 102 103 103 104 105 105 108 108 109 109 110 110 111 111 111 112 114 114 114 115 Columns 30 through 32 116 117 121 a = Columns 1 through 29 0 0 1 2 0 0 0 1 1 1 0 1 1 0 3 0 1 0 1 0 1 0 0 1 2 0 0 1 1 Columns 30 through 31 1 4 tf = logical 0

9   Pass
x = 'AbcDE FgHiJKl mmoPQrstuV Wxyz'; y_correct = false; assert(isequal(isPangram(x),y_correct))

a = 'a b c d e f g h i j k l m m o p q r s t u v w x y z' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 97 98 99 100 Columns 30 through 51 101 102 103 104 105 106 107 108 109 109 111 112 113 114 115 116 117 118 119 120 121 122 a = 97 98 99 100 101 102 103 104 105 106 107 108 109 109 111 112 113 114 115 116 117 118 119 120 121 122 a = 1 1 1 1 1 1 1 1 1 1 1 1 0 2 1 1 1 1 1 1 1 1 1 1 1 tf = logical 0

10   Pass
x = 'With quiz game Cody for MATLAB, expect perverse junk.'; y_correct = true; assert(isequal(isPangram(x),y_correct))

a = 'w i t h q u i z g a m e c o d y f o r m a t l a b e x p e c t p e r v e r s e j u n k' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 32 32 32 32 32 32 32 32 32 32 32 97 97 97 98 99 99 100 101 101 101 101 101 101 102 103 104 Columns 59 through 85 105 105 106 107 108 109 109 110 111 111 112 112 113 114 114 114 115 116 116 116 117 117 118 119 120 121 122 a = Columns 1 through 29 97 97 97 98 99 99 100 101 101 101 101 101 101 102 103 104 105 105 106 107 108 109 109 110 111 111 112 112 113 Columns 30 through 43 114 114 114 115 116 116 116 117 117 118 119 120 121 122 a = Columns 1 through 29 0 0 1 1 0 1 1 0 0 0 0 0 1 1 1 1 0 1 1 1 1 0 1 1 0 1 0 1 1 Columns 30 through 42 0 0 1 1 0 0 1 0 1 1 1 1 1 tf = logical 1

11   Pass
x = 'Punctuation marks like @#\$%^</&>*?!!, when used in cartoons to stand in for swearing, are called "grawlix".'; y_correct = false; assert(isequal(isPangram(x),y_correct))

a = 'p u n c t u a t i o n m a r k s l i k e w h e n u s e d i n c a r t o o n s t o s t a n d i n f o r s w e a r i n g a r e c a l l e d g r a w l i x' a = Columns 1 through 29 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 30 through 58 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 Columns 59 through 87 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 97 97 97 97 97 97 97 97 99 99 99 100 100 100 Columns 88 through 116 101 101 101 101 101 101 102 103 103 104 105 105 105 105 105 105 107 107 108 108 108 108 109 110 110 110 110 110 110 Columns 117 through 145 110 110 111 111 111 111 111 112 114 114 114 114 114 114 115 115 115 115 115 116 116 116 116 116 117 117 117 119 119 Columns 146 through 147 119 120 a = Columns 1 through 29 97 97 97 97 97 97 97 97 99 99 99 100 100 100 101 101 101 101 101 101 102 103 103 104 105 105 105 105 105 Columns 30 through 58 105 107 107 108 108 108 108 109 110 110 110 110 110 110 110 110 111 111 111 111 111 112 114 114 114 114 114 114 115 Columns 59 through 74 115 115 115 115 116 116 116 116 116 117 117 117 119 119 119 120 a = Columns 1 through 29 0 0 0 0 0 0 0 2 0 0 1 0 0 1 0 0 0 0 0 1 1 0 1 1 0 0 0 0 0 Columns 30 through 58 2 0 1 0 0 0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 1 2 0 0 0 0 0 1 0 Columns 59 through 73 0 0 0 1 0 0 0 0 1 0 0 2 0 0 1 tf = logical 0