Cody

Problem 27. Pangrams!

Solution 2819128

Submitted on 11 Aug 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 = 'The quick brown fox jumps over a lazy dog'; y_correct = true; assert(isequal(isPangram(x),y_correct))

s = 'The quick brown fox jumps over lzy dog' tf = logical 0 s = 'The quick rown fox jumps over lzy dog' tf = logical 0 s = 'The quik rown fox jumps over lzy dog' tf = logical 0 s = 'The quik rown fox jumps over lzy og' tf = logical 0 s = 'Th quik rown fox jumps ovr lzy og' tf = logical 0 s = 'Th quik rown ox jumps ovr lzy og' tf = logical 0 s = 'Th quik rown ox jumps ovr lzy o' tf = logical 0 s = 'T quik rown ox jumps ovr lzy o' tf = logical 0 s = 'T quk rown ox jumps ovr lzy o' tf = logical 0 s = 'T quk rown ox umps ovr lzy o' tf = logical 0 s = 'T qu rown ox umps ovr lzy o' tf = logical 0 s = 'T qu rown ox umps ovr zy o' tf = logical 0 s = 'T qu rown ox ups ovr zy o' tf = logical 0 s = 'T qu row ox ups ovr zy o' tf = logical 0 s = 'T qu rw x ups vr zy ' tf = logical 0 s = 'T qu rw x us vr zy ' tf = logical 0 s = 'T u rw x us vr zy ' tf = logical 0 s = 'T u w x us v zy ' tf = logical 0 s = 'T u w x u v zy ' tf = logical 0 tf = logical 0 s = 'T w x v zy ' tf = logical 0 s = 'T w x zy ' tf = logical 0 s = 'T x zy ' tf = logical 0 s = 'T zy ' tf = logical 0 s = 'T z ' tf = logical 0 s = 'T ' tf = logical 0

Assertion failed.

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

s = 'The quick brown fox jumped over lzy dog' tf = logical 0 s = 'The quick rown fox jumped over lzy dog' tf = logical 0 s = 'The quik rown fox jumped over lzy dog' tf = logical 0 s = 'The quik rown fox jumpe over lzy og' tf = logical 0 s = 'Th quik rown fox jump ovr lzy og' tf = logical 0 s = 'Th quik rown ox jump ovr lzy og' tf = logical 0 s = 'Th quik rown ox jump ovr lzy o' tf = logical 0 s = 'T quik rown ox jump ovr lzy o' tf = logical 0 s = 'T quk rown ox jump ovr lzy o' tf = logical 0 s = 'T quk rown ox ump ovr lzy o' tf = logical 0 s = 'T qu rown ox ump ovr lzy o' tf = logical 0 s = 'T qu rown ox ump ovr zy o' tf = logical 0 s = 'T qu rown ox up ovr zy o' tf = logical 0 s = 'T qu row ox up ovr zy o' tf = logical 0 s = 'T qu rw x up vr zy ' tf = logical 0 s = 'T qu rw x u vr zy ' tf = logical 0 s = 'T u rw x u vr zy ' tf = logical 0 s = 'T u w x u v zy ' tf = logical 0 tf = logical 0 tf = logical 0 s = 'T w x v zy ' tf = logical 0 s = 'T w x zy ' tf = logical 0 s = 'T x zy ' tf = logical 0 s = 'T zy ' tf = logical 0 s = 'T z ' tf = logical 0 s = 'T ' tf = logical 0

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

s = 'Pck my box with five dozen liquor jugs' tf = logical 0 s = 'Pck my ox with five dozen liquor jugs' tf = logical 0 s = 'Pk my ox with five dozen liquor jugs' tf = logical 0 s = 'Pk my ox with five ozen liquor jugs' tf = logical 0 s = 'Pk my ox with fiv ozn liquor jugs' tf = logical 0 s = 'Pk my ox with iv ozn liquor jugs' tf = logical 0 s = 'Pk my ox with iv ozn liquor jus' tf = logical 0 s = 'Pk my ox wit iv ozn liquor jus' tf = logical 0 s = 'Pk my ox wt v ozn lquor jus' tf = logical 0 s = 'Pk my ox wt v ozn lquor us' tf = logical 0 s = 'P my ox wt v ozn lquor us' tf = logical 0 s = 'P my ox wt v ozn quor us' tf = logical 0 s = 'P y ox wt v ozn quor us' tf = logical 0 s = 'P y ox wt v oz quor us' tf = logical 0 s = 'P y x wt v z qur us' tf = logical 0 tf = logical 0 s = 'P y x wt v z ur us' tf = logical 0 s = 'P y x wt v z u us' tf = logical 0 s = 'P y x wt v z u u' tf = logical 0 s = 'P y x w v z u u' tf = logical 0 s = 'P y x w v z ' tf = logical 0 s = 'P y x w z ' tf = logical 0 s = 'P y x z ' tf = logical 0 s = 'P y z ' tf = logical 0 s = 'P z ' tf = logical 0 s = 'P ' tf = logical 0

Assertion failed.

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

s = 'Pck my box with four dozen liquor jugs' tf = logical 0 s = 'Pck my ox with four dozen liquor jugs' tf = logical 0 s = 'Pk my ox with four dozen liquor jugs' tf = logical 0 s = 'Pk my ox with four ozen liquor jugs' tf = logical 0 s = 'Pk my ox with four ozn liquor jugs' tf = logical 0 s = 'Pk my ox with our ozn liquor jugs' tf = logical 0 s = 'Pk my ox with our ozn liquor jus' tf = logical 0 s = 'Pk my ox wit our ozn liquor jus' tf = logical 0 s = 'Pk my ox wt our ozn lquor jus' tf = logical 0 s = 'Pk my ox wt our ozn lquor us' tf = logical 0 s = 'P my ox wt our ozn lquor us' tf = logical 0 s = 'P my ox wt our ozn quor us' tf = logical 0 s = 'P y ox wt our ozn quor us' tf = logical 0 s = 'P y ox wt our oz quor us' tf = logical 0 s = 'P y x wt ur z qur us' tf = logical 0 tf = logical 0 s = 'P y x wt ur z ur us' tf = logical 0 s = 'P y x wt u z u us' tf = logical 0 s = 'P y x wt u z u u' tf = logical 0 s = 'P y x w u z u u' tf = logical 0 s = 'P y x w z ' tf = logical 0 tf = logical 0 s = 'P y x z ' tf = logical 0 s = 'P y z ' tf = logical 0 s = 'P z ' tf = logical 0 s = 'P ' tf = logical 0

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

s = 'Sphinx of blck qurtz, judge my vow' tf = logical 0 s = 'Sphinx of lck qurtz, judge my vow' tf = logical 0 s = 'Sphinx of lk qurtz, judge my vow' tf = logical 0 s = 'Sphinx of lk qurtz, juge my vow' tf = logical 0 s = 'Sphinx of lk qurtz, jug my vow' tf = logical 0 s = 'Sphinx o lk qurtz, jug my vow' tf = logical 0 s = 'Sphinx o lk qurtz, ju my vow' tf = logical 0 s = 'Spinx o lk qurtz, ju my vow' tf = logical 0 s = 'Spnx o lk qurtz, ju my vow' tf = logical 0 s = 'Spnx o lk qurtz, u my vow' tf = logical 0 s = 'Spnx o l qurtz, u my vow' tf = logical 0 s = 'Spnx o qurtz, u my vow' tf = logical 0 s = 'Spnx o qurtz, u y vow' tf = logical 0 s = 'Spx o qurtz, u y vow' tf = logical 0 s = 'Spx qurtz, u y vw' tf = logical 0 s = 'Sx qurtz, u y vw' tf = logical 0 s = 'Sx urtz, u y vw' tf = logical 0 s = 'Sx utz, u y vw' tf = logical 0 tf = logical 0 s = 'Sx uz, u y vw' tf = logical 0 s = 'Sx z, y vw' tf = logical 0 s = 'Sx z, y w' tf = logical 0 s = 'Sx z, y ' tf = logical 0 s = 'S z, y ' tf = logical 0 s = 'S z, ' tf = logical 0 s = 'S , ' tf = logical 0

Assertion failed.

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

s = 'Sphinx of blck onyx, judge my vow' tf = logical 0 s = 'Sphinx of lck onyx, judge my vow' tf = logical 0 s = 'Sphinx of lk onyx, judge my vow' tf = logical 0 s = 'Sphinx of lk onyx, juge my vow' tf = logical 0 s = 'Sphinx of lk onyx, jug my vow' tf = logical 0 s = 'Sphinx o lk onyx, jug my vow' tf = logical 0 s = 'Sphinx o lk onyx, ju my vow' tf = logical 0 s = 'Spinx o lk onyx, ju my vow' tf = logical 0 s = 'Spnx o lk onyx, ju my vow' tf = logical 0 s = 'Spnx o lk onyx, u my vow' tf = logical 0 s = 'Spnx o l onyx, u my vow' tf = logical 0 s = 'Spnx o onyx, u my vow' tf = logical 0 s = 'Spnx o onyx, u y vow' tf = logical 0 s = 'Spx o oyx, u y vow' tf = logical 0 s = 'Spx yx, u y vw' tf = logical 0 s = 'Sx yx, u y vw' tf = logical 0 tf = logical 0 tf = logical 0 tf = logical 0 tf = logical 0 s = 'Sx yx, y vw' tf = logical 0 s = 'Sx yx, y w' tf = logical 0 s = 'Sx yx, y ' tf = logical 0 s = 'S y, y ' tf = logical 0 s = 'S , ' tf = logical 0 tf = logical 0

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

s = 'Wonderful wtermelon, bringer of life.' tf = logical 0 s = 'Wonderful wtermelon, ringer of life.' tf = logical 0 tf = logical 0 s = 'Wonerful wtermelon, ringer of life.' tf = logical 0 s = 'Wonrful wtrmlon, ringr of lif.' tf = logical 0 s = 'Wonrul wtrmlon, ringr o li.' tf = logical 0 s = 'Wonrul wtrmlon, rinr o li.' tf = logical 0 tf = logical 0 s = 'Wonrul wtrmlon, rnr o l.' tf = logical 0 tf = logical 0 tf = logical 0 s = 'Wonru wtrmon, rnr o .' tf = logical 0 s = 'Wonru wtron, rnr o .' tf = logical 0 s = 'Woru wtro, rr o .' tf = logical 0 s = 'Wru wtr, rr .' tf = logical 0 tf = logical 0 tf = logical 0 s = 'Wu wt, .' tf = logical 0 tf = logical 0 s = 'Wu w, .' tf = logical 0 s = 'W w, .' tf = logical 0 tf = logical 0 s = 'W , .' tf = logical 0 tf = logical 0 tf = logical 0 tf = logical 0

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

s = 'Dstrdly dumpling, hrbinger of doom!' tf = logical 0 s = 'Dstrdly dumpling, hringer of doom!' tf = logical 0 tf = logical 0 s = 'Dstrly umpling, hringer of oom!' tf = logical 0 s = 'Dstrly umpling, hringr of oom!' tf = logical 0 s = 'Dstrly umpling, hringr o oom!' tf = logical 0 s = 'Dstrly umplin, hrinr o oom!' tf = logical 0 s = 'Dstrly umplin, rinr o oom!' tf = logical 0 s = 'Dstrly umpln, rnr o oom!' tf = logical 0 tf = logical 0 tf = logical 0 s = 'Dstry umpn, rnr o oom!' tf = logical 0 s = 'Dstry upn, rnr o oo!' tf = logical 0 s = 'Dstry up, rr o oo!' tf = logical 0 s = 'Dstry up, rr !' tf = logical 0 s = 'Dstry u, rr !' tf = logical 0 tf = logical 0 s = 'Dsty u, !' tf = logical 0 s = 'Dty u, !' tf = logical 0 s = 'Dy u, !' tf = logical 0 s = 'Dy , !' tf = logical 0 tf = logical 0 tf = logical 0 tf = logical 0 s = 'D , !' tf = logical 0 tf = logical 0

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

tf = logical 0 s = 'AcDE FgHiJKl mmoPQrstuV Wxyz' tf = logical 0 s = 'ADE FgHiJKl mmoPQrstuV Wxyz' tf = logical 0 tf = logical 0 tf = logical 0 tf = logical 0 s = 'ADE FHiJKl mmoPQrstuV Wxyz' tf = logical 0 tf = logical 0 s = 'ADE FHJKl mmoPQrstuV Wxyz' tf = logical 0 tf = logical 0 tf = logical 0 s = 'ADE FHJK mmoPQrstuV Wxyz' tf = logical 0 s = 'ADE FHJK oPQrstuV Wxyz' tf = logical 0 tf = logical 0 s = 'ADE FHJK PQrstuV Wxyz' tf = logical 0 tf = logical 0 tf = logical 0 s = 'ADE FHJK PQstuV Wxyz' tf = logical 0 s = 'ADE FHJK PQtuV Wxyz' tf = logical 0 s = 'ADE FHJK PQuV Wxyz' tf = logical 0 s = 'ADE FHJK PQV Wxyz' tf = logical 0 tf = logical 0 tf = logical 0 s = 'ADE FHJK PQV Wyz' tf = logical 0 s = 'ADE FHJK PQV Wz' tf = logical 0 s = 'ADE FHJK PQV W' tf = logical 0

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

s = 'With quiz gme Cody for MATLAB, expect perverse junk.' tf = logical 0 tf = logical 0 s = 'With quiz gme Cody for MATLAB, expet perverse junk.' tf = logical 0 s = 'With quiz gme Coy for MATLAB, expet perverse junk.' tf = logical 0 s = 'With quiz gm Coy for MATLAB, xpt prvrs junk.' tf = logical 0 s = 'With quiz gm Coy or MATLAB, xpt prvrs junk.' tf = logical 0 s = 'With quiz m Coy or MATLAB, xpt prvrs junk.' tf = logical 0 s = 'Wit quiz m Coy or MATLAB, xpt prvrs junk.' tf = logical 0 s = 'Wt quz m Coy or MATLAB, xpt prvrs junk.' tf = logical 0 s = 'Wt quz m Coy or MATLAB, xpt prvrs unk.' tf = logical 0 s = 'Wt quz m Coy or MATLAB, xpt prvrs un.' tf = logical 0 tf = logical 0 s = 'Wt quz Coy or MATLAB, xpt prvrs un.' tf = logical 0 s = 'Wt quz Coy or MATLAB, xpt prvrs u.' tf = logical 0 s = 'Wt quz Cy r MATLAB, xpt prvrs u.' tf = logical 0 s = 'Wt quz Cy r MATLAB, xt rvrs u.' tf = logical 0 s = 'Wt uz Cy r MATLAB, xt rvrs u.' tf = logical 0 s = 'Wt uz Cy MATLAB, xt vs u.' tf = logical 0 s = 'Wt uz Cy MATLAB, xt v u.' tf = logical 0 s = 'W uz Cy MATLAB, x v u.' tf = logical 0 s = 'W z Cy MATLAB, x v .' tf = logical 0 s = 'W z Cy MATLAB, x .' tf = logical 0 tf = logical 0 s = 'W z Cy MATLAB, .' tf = logical 0 s = 'W z C MATLAB, .' tf = logical 0 s = 'W C MATLAB, .' tf = logical 0

Assertion failed.

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))

s = 'Punctution mrks like @#$%^</&>*?!!, when used in crtoons to stnd in for swering, re clled "grwlix".' tf = logical 0 tf = logical 0 s = 'Puntution mrks like @#$%^</&>*?!!, when used in rtoons to stnd in for swering, re lled "grwlix".' tf = logical 0 s = 'Puntution mrks like @#$%^</&>*?!!, when use in rtoons to stn in for swering, re lle "grwlix".' tf = logical 0 s = 'Puntution mrks lik @#$%^</&>*?!!, whn us in rtoons to stn in for swring, r ll "grwlix".' tf = logical 0 s = 'Puntution mrks lik @#$%^</&>*?!!, whn us in rtoons to stn in or swring, r ll "grwlix".' tf = logical 0 s = 'Puntution mrks lik @#$%^</&>*?!!, whn us in rtoons to stn in or swrin, r ll "rwlix".' tf = logical 0 s = 'Puntution mrks lik @#$%^</&>*?!!, wn us in rtoons to stn in or swrin, r ll "rwlix".' tf = logical 0 s = 'Puntuton mrks lk @#$%^</&>*?!!, wn us n rtoons to stn n or swrn, r ll "rwlx".' tf = logical 0 tf = logical 0 s = 'Puntuton mrs l @#$%^</&>*?!!, wn us n rtoons to stn n or swrn, r ll "rwlx".' tf = logical 0 s = 'Puntuton mrs @#$%^</&>*?!!, wn us n rtoons to stn n or swrn, r "rwx".' tf = logical 0 s = 'Puntuton rs @#$%^</&>*?!!, wn us n rtoons to stn n or swrn, r "rwx".' tf = logical 0 s = 'Pututo rs @#$%^</&>*?!!, w us rtoos to st or swr, r "rwx".' tf = logical 0 s = 'Putut rs @#$%^</&>*?!!, w us rts t st r swr, r "rwx".' tf = logical 0 tf = logical 0 tf = logical 0 s = 'Putut s @#$%^</&>*?!!, w us ts t st sw, "wx".' tf = logical 0 s = 'Putut @#$%^</&>*?!!, w u t t t w, "wx".' tf = logical 0 s = 'Puu @#$%^</&>*?!!, w u w, "wx".' tf = logical 0 s = 'P @#$%^</&>*?!!, w w, "wx".' tf = logical 0 tf = logical 0 s = 'P @#$%^</&>*?!!, , "x".' tf = logical 0 s = 'P @#$%^</&>*?!!, , "".' tf = logical 0 tf = logical 0 tf = logical 0

Suggested Problems

More from this Author95

Community Treasure Hunt

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

Start Hunting!