Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 113541

Submitted on 16 Jul 2012

Incorrect

19Size
Leading solution size is 7.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Fail
 
%%
me=randi(10000);
challenger=Good_Luck(1);
assert(isequal(me,challenger))
Error: You may not use the command(s) eval in your code
2
Fail
 
%%
randi(5);
randi(5);
y=randi(5)+20;
rng(y);
challenger=Good_Luck(1);
if isequal(2,1)
 while true
  % Binbin Qi gets a TimeOut
 end
end
me=randi(10000);
assert(isequal(challenger,me))
Error: You may not use the command(s) eval in your code
3
Fail
 
%%
randi(5);
y=randi(5)+20;
rng(y);
me=randi(10000);
challenger=Good_Luck(1);
assert(me==challenger)
Error: You may not use the command(s) eval in your code
4
Fail
 
%%
randi(5);
y=randi(5)+20;
rng(y);
randi(10000);
me=randi(10000);
challenger=Good_Luck(1);
assert(isequal(me,challenger))
Error: You may not use the command(s) eval in your code
5
Fail
 
%%
randi(5);randi(5);randi(5);
y=randi(5)+20;
rng(y);
me=randi(10000);
challenger=Good_Luck(1);
assert(isequal(me,challenger))
Error: You may not use the command(s) eval in your code
6
Fail
 
%%
y=randi(5);
while y<20
 y=y+randi(5);
end
rng(y);
me=randi(10000);
challenger=Good_Luck(1);
assert(me==challenger)
Error: You may not use the command(s) eval in your code
7
Fail
 
%%
rng(24);
me=randi(10000);
challenger=Good_Luck(1);
assert(me==challenger)
Error: You may not use the command(s) eval in your code
8
Fail
 
%%
rng(23);
randi(10000);
me=randi(10000);
challenger=Good_Luck(1);
assert(me==challenger)
Error: You may not use the command(s) eval in your code
9
Fail
 
%%
challenger=Good_Luck(1);
me=randi(10000);
assert(challenger==me)
Error: You may not use the command(s) eval in your code
10
Fail
 
%%
me=randi(10000);
challenger=Good_Luck(1);
assert(isequal(me,challenger))
Error: You may not use the command(s) eval in your code
11
Fail
 
%%
rng(25);
challenger=Good_Luck(1);
me=randi(10000);
assert(isequal(me,challenger))
Error: You may not use the command(s) eval in your code