Cody

Problem 480. Aufbau principle

Solution 1941555

Submitted on 18 Sep 2019
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
sumofx = 3; % Lithium electrons = '1s2,2s1'; assert(isequal(electrons,Aufbau(sumofx)))

2   Fail
sumofx = 6; % Carbon electrons = '1s2,2s2,2p2'; assert(isequal(electrons,Aufbau(sumofx)))

Output argument "electrons" (and maybe others) not assigned during call to "Aufbau". Error in Test2 (line 3) assert(isequal(electrons,Aufbau(sumofx)))

3   Fail
sumofx = 10; % Neon electrons = '1s2,2s2,2p6'; assert(isequal(electrons,Aufbau(sumofx)))

Output argument "electrons" (and maybe others) not assigned during call to "Aufbau". Error in Test3 (line 3) assert(isequal(electrons,Aufbau(sumofx)))

4   Fail
sumofx = 17; % Chlorine electrons = '1s2,2s2,2p6,3s2,3p5'; assert(isequal(electrons,Aufbau(sumofx)))

Output argument "electrons" (and maybe others) not assigned during call to "Aufbau". Error in Test4 (line 3) assert(isequal(electrons,Aufbau(sumofx)))

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!