Cody

Problem 480. Aufbau principle

Solution 1631384

Submitted on 21 Sep 2018 by Suraj Gurav
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   Pass
sumofx = 6; % Carbon electrons = '1s2,2s2,2p2'; assert(isequal(electrons,Aufbau(sumofx)))

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

4   Pass
sumofx = 17; % Chlorine electrons = '1s2,2s2,2p6,3s2,3p5'; 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!