Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
class Atom:
  """An element for the periodic table."""
  def __init__(self, symbol, atomic, mass, isotope=12):
    """Constructs an Atom with the given values"""
    self.symbol = symbol
    self.atomic=atomic
    self.mass=mass
    self.isotope = isotope

# Code from atom in model 1

oxygen = Atom('O', 8, 15.999, 16) 
carbon = Atom('C', 6, 12.001)
oxygen.neutrons()
carbon.neutrons()
oxygen.grams_to_moles(24)
carbon.grams_to_moles(24)