Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
d in [0, 14] only solution in Clear category for Noble Gas Notation by Max0526
ATOMIC_NUMBERS = AN = {"H": 1, "He": 2, "Li": 3, "O": 8, "Ne": 10, "Na": 11, "Al": 13, "Cl": 17, "Ar": 18, \
"K": 19, "V": 23, "Br": 35, "Kr": 36, "Rb": 37, "In": 49, "I": 53, "Xe": 54, \
"Ir": 77, "Tl": 81, "Rn": 86, "Fr": 87, "Db": 105, "Ds": 110, "Ts": 117, "Og": 118, }
NOBLE_GASES = NG = ["He", "Ne", "Ar", "Kr", "Xe", "Rn", "Og"]
ORBITAL_CAPACITIES = {"s": 2, "p": 6, "d": 10, "f": 14} # not used yet
def notation(e):
if e == 'H': return '1s1'
if e == 'He': return '1s2'
charge, ec, r = AN[e], AN[e], '' # ec = extra charge
for g in NG[::-1]:
if charge - AN[g] > 0: ec = charge - AN[g]; r = '[' + g + ']'; break
t = NG.index(g) + 2; f = d = s = p = ''
if ec == 1: ec -= 1; s = ' ' + str(t) + 's1'
if ec >= 2: ec -= 2; s = ' ' + str(t) + 's2'
if t in [6, 7] and ec > 14: ec -= 14; f = ' ' + str(t - 2) + 'f14'
if t in [4, 5, 6, 7] and ec > 0:
if 1 <= ec <= 10: d = ' ' + str(t - 1) + 'd' + str(ec); ec = 0
elif ec > 10: d = ' ' + str(t - 1) + 'd10'; ec -= 10
p = ' ' + str(t) + 'p' + str(ec) if ec > 0 else ''
return r + f + d + s + p
Oct. 23, 2025
Comments: