Periodic Table Data in Python
pip install chempy
from chempy.util import periodic
n = int(input("Enter number to see the table: "))
print("Atomic No.\tName\t\tSymbol\t\tMass")
for i in range(1, n + 1):
print(i, end="\t\t")
if len(periodic.names[i]) > 7:
print(periodic.names[i], end="\t")
else:
print(periodic.names[i], end="\t\t")
print(periodic.symbols[i], end="\t\t")
print(periodic.relative_atomic_masses[i])
#source code --> clcoding.com
Atomic No. Name Symbol Mass
1 Helium He 4.002602
2 Lithium Li 6.94
3 Beryllium Be 9.0121831
4 Boron B 10.81
5 Carbon C 12.011
6 Nitrogen N 14.007
7 Oxygen O 15.999
8 Fluorine F 18.998403163
9 Neon Ne 20.1797
10 Sodium Na 22.98976928
11 Magnesium Mg 24.305
12 Aluminium Al 26.9815384
13 Silicon Si 28.085
14 Phosphorus P 30.973761998
15 Sulfur S 32.06
16 Chlorine Cl 35.45
17 Argon Ar 39.95
18 Potassium K 39.0983
19 Calcium Ca 40.078
20 Scandium Sc 44.955908
0 Comments:
Post a Comment