Cody

Solution 1952437

Submitted on 29 Sep 2019 by Khanh Le Quang
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
a = [2 3 4]; assert(isequal(isItSquared(a),true))

var2 = 0 num = 1.4142 num = 1.7321 num = 2 var2 = 1 b = logical 1

2   Pass
a = [20:30]; assert(isequal(isItSquared(a),false))

var2 = 0 num = 4.4721 num = 4.5826 num = 4.6904 num = 4.7958 num = 4.8990 num = 5 num = 5.0990 num = 5.1962 num = 5.2915 num = 5.3852 num = 5.4772 b = logical 0

3   Pass
a = [1]; assert(isequal(isItSquared(a),true))

var2 = 0 num = 1 var2 = 1 b = logical 1

4   Pass
a = [6 10 12 14 36 101]; assert(isequal(isItSquared(a),true))

var2 = 0 num = 2.4495 num = 3.1623 num = 3.4641 num = 3.7417 num = 6 var2 = 1 num = 10.0499 b = logical 1

5   Pass
a = [6 10 12 14 101]; assert(isequal(isItSquared(a),false))

var2 = 0 num = 2.4495 num = 3.1623 num = 3.4641 num = 3.7417 num = 10.0499 b = logical 0

Suggested Problems

More from this Author95