Cody

Solution 333058

Submitted on 12 Oct 2013
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
%% eqn='CH4'; mass=atomic_wt(eqn) assert(isequal(mass,16))

Error: You may not use the command(s) eval in your code

2   Fail
%% eqn='O2'; mass=atomic_wt(eqn) assert(isequal(mass,32))

Error: You may not use the command(s) eval in your code

3   Fail
%% eqn='CO2'; mass=atomic_wt(eqn) assert(isequal(mass,44))

Error: You may not use the command(s) eval in your code

4   Fail
%% eqn='C2H6'; mass=atomic_wt(eqn) assert(isequal(mass,30))

Error: You may not use the command(s) eval in your code

5   Fail
%% eqn='H2SO4'; % 98 mass=atomic_wt(eqn) assert(isequal(mass,98))

Error: You may not use the command(s) eval in your code

6   Fail
%% eqn='SO4'; % 96 mass=atomic_wt(eqn) assert(isequal(mass,96))

Error: You may not use the command(s) eval in your code

7   Fail
%% eqn='NO2'; % 46 mass=atomic_wt(eqn) assert(isequal(mass,46))

Error: You may not use the command(s) eval in your code

8   Fail
%% eqn='NO'; % 30 mass=atomic_wt(eqn) assert(isequal(mass,30))

Error: You may not use the command(s) eval in your code