Cody

# Problem 44389. Just take it easy for a second or two!

Solution 1886345

Submitted on 28 Jul 2019
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
% Hacking of the Test Suite is not allowed! % Additional restrictions will be added if necessary. assessFunctionAbsence({'!', 'assert', 'evalin', 'assignin', 'system', 'dos', 'unix'}, 'FileName', 'waitForMe.m') assert( isempty( regexp(fileread('waitForMe.m'),'[!]+','match') ) , 'No exclamation marks (!) allowed!!!')

2   Fail
t_correct = 1000; c = cputime; tic; waitForMe(t_correct); t = toc e = cputime - c assert( abs(t_correct - t*1000) <= 0.5 ) assert( e*1000 / t_correct <= 0.05 )

pre = 8×6 table <strong>Year</strong> <strong>Month</strong> <strong>ArrDelay</strong> <strong>DepDelay</strong> <strong>Origin</strong> <strong>Dest</strong> <strong>____</strong> <strong>_____</strong> <strong>________</strong> <strong>________</strong> <strong>______</strong> <strong>____</strong> 1987 10 8 12 LAX SJC 1987 10 8 1 SJC BUR 1987 10 21 20 SAN SMF 1987 10 13 12 BUR SJC 1987 10 4 -1 SMF LAX 1987 10 59 63 LAX SJC 1987 10 3 -2 SAN SFO 1987 10 11 -1 SEA LAX t = 4.1535 e = 2.9500

Assertion failed.

3   Fail
t_correct = 2000; c = cputime; tic; waitForMe(t_correct); t = toc e = cputime - c assert( abs(t_correct - t*1000) <= 0.5 ) assert( e*1000 / t_correct <= 0.05 )

pre = 8×6 table <strong>Year</strong> <strong>Month</strong> <strong>ArrDelay</strong> <strong>DepDelay</strong> <strong>Origin</strong> <strong>Dest</strong> <strong>____</strong> <strong>_____</strong> <strong>________</strong> <strong>________</strong> <strong>______</strong> <strong>____</strong> 1987 10 8 12 LAX SJC 1987 10 8 1 SJC BUR 1987 10 21 20 SAN SMF 1987 10 13 12 BUR SJC 1987 10 4 -1 SMF LAX 1987 10 59 63 LAX SJC 1987 10 3 -2 SAN SFO 1987 10 11 -1 SEA LAX t = 0.3756 e = 0.3700

Assertion failed.

4   Fail
t_correct = 1000; for r = 1 : 3 c = cputime; tic; waitForMe(t_correct); t = toc e = cputime - c assert( abs(t_correct - t*1000) <= 0.5 ) assert( e*1000 / t_correct <= 0.05 ) end;

pre = 8×6 table <strong>Year</strong> <strong>Month</strong> <strong>ArrDelay</strong> <strong>DepDelay</strong> <strong>Origin</strong> <strong>Dest</strong> <strong>____</strong> <strong>_____</strong> <strong>________</strong> <strong>________</strong> <strong>______</strong> <strong>____</strong> 1987 10 8 12 LAX SJC 1987 10 8 1 SJC BUR 1987 10 21 20 SAN SMF 1987 10 13 12 BUR SJC 1987 10 4 -1 SMF LAX 1987 10 59 63 LAX SJC 1987 10 3 -2 SAN SFO 1987 10 11 -1 SEA LAX t = 0.3235 e = 0.3200

Assertion failed.

5   Fail
t_correct = 2000; for r = 1 : 2 c = cputime; tic; waitForMe(t_correct); t = toc e = cputime - c assert( abs(t_correct - t*1000) <= 0.5 ) assert( e*1000 / t_correct <= 0.05 ) end;

pre = 8×6 table <strong>Year</strong> <strong>Month</strong> <strong>ArrDelay</strong> <strong>DepDelay</strong> <strong>Origin</strong> <strong>Dest</strong> <strong>____</strong> <strong>_____</strong> <strong>________</strong> <strong>________</strong> <strong>______</strong> <strong>____</strong> 1987 10 8 12 LAX SJC 1987 10 8 1 SJC BUR 1987 10 21 20 SAN SMF 1987 10 13 12 BUR SJC 1987 10 4 -1 SMF LAX 1987 10 59 63 LAX SJC 1987 10 3 -2 SAN SFO 1987 10 11 -1 SEA LAX t = 0.2181 e = 0.2200

Assertion failed.