Cody

Problem 536. Cody Computer Part 2 - Get the license number of Cody Computer

Solution 3153401

Submitted on 10 Oct 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
S= evalc('ver'); index = findstr('MATLAB License Number:',S); startis = index+length('MATLAB License Number:'); licensis = S(startis:startis+7); y_correct = strtrim(licensis) assert(isequal(piracy_or_not,y_correct)) % Prevents cheating 16-Apr-2012 filetext = fileread('piracy_or_not.m') assert(isempty(strfind(filetext, '655986')))

y_correct = 'Operat' y = struct with fields: Name: 'MATLAB' Version: '9.9' Release: '(R2020b)' Date: '31-Aug-2020'

Output argument "license_number" (and maybe others) not assigned during call to "piracy_or_not". Error in Test1 (line 6) assert(isequal(piracy_or_not,y_correct))

Suggested Problems

More from this Author30

Community Treasure Hunt

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

Start Hunting!