Cody

Problem 387. drowsy?

Solution 2158527

Submitted on 13 Mar 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
tic dog=@()pause(100/1000); drowsy=wakeup(dog) drowsy_correct = 1 toc assert(drowsy==drowsy_correct) assert(toc>1/10)

s = 1 drowsy = 1 drowsy = 1 drowsy_correct = 1 Elapsed time is 0.003749 seconds.

Assertion failed.

2   Pass
tic dog=@()pause(10/1000); drowsy=wakeup(dog) drowsy_correct = 0 toc assert(drowsy==drowsy_correct) assert(toc<1)

s = 2 drowsy = 0 drowsy = 0 drowsy_correct = 0 Elapsed time is 0.000404 seconds.

Suggested Problems

More from this Author100

Community Treasure Hunt

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

Start Hunting!