Cody

# Problem 1361. Periodic Table 101.

Solution 219070

Submitted on 19 Mar 2013 by Richard Zapor
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
%% z = 1; y_correct = 'H'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = H

2   Pass
%% z = 3; y_correct = 'Li'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = Li

3   Pass
%% z = 5; y_correct = 'B'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = B

4   Pass
%% z = 7; y_correct = 'N'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = N

5   Pass
%% z = 22; y_correct = 'Ti'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = Ti

6   Pass
%% z = 15; y_correct = 'P'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = P

7   Pass
%% z = 13; y_correct = 'Al'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = Al

8   Pass
%% z = 10; y_correct = 'Ne'; assert(isequal(atomicNumber(z),y_correct))

pt = Columns 1 through 13 'H' 'He' 'Li' 'Be' 'B' 'C' 'N' 'O' 'F' 'Ne' 'Na' 'Mg' 'Al' Columns 14 through 22 'Si' 'P' 'S' 'Cl' 'Ar' 'K' 'Ca' 'Sc' 'Ti' ans = Ne