#list of atoms
atoms=["Hydrogen","Helium","Lithium","Beryllium","Boron","Carbon","Nitrogen","Oxygen","Fluorine","Neon","Sodium","Magnesium","Aluminum","Silicon","Phosphorus","Sulfur","Chlorine","Argon","Potassium","Calcium","Scandium","Titanium","Vanadium","Chromium","Maganese","Iron","Cobalt","Nickle","Copper","Zinc","Gallium","Germanium","Arsenic","Selenium","Bromine","Krypton","Rubidium","Strontium","Yttrium","Zirconium","Niobium","Molybdenum","Technetium","Ruthenium","Rhodium","Palladium","Silver","Cadmium","Indium","Tin","Antimony","Tellurium","Iodine","Xenon","Cesium","Barium","Lanthanum","Cerium","Praseodymium","Neodymium","Promethium","Samarium","Europium","Gadolinium","Terbium","Dysprosium","Holmium","Erbium","Thulium","Ytterbium","Lutetium","Hafnium","Tantalum","Tungsten","Rhenium","Osmium","Iridium","Platinum","Gold","Mercury","Thallium","Lead","Bismuth","Polonium","Astatine","Radon","Francium","Radium"]

#Main program

choice=""
while choice !="X":
      print("======================")
      print("A T O M  F I N D E R")
      print("======================")
      print("\n")
      print("A: Append an atom to the list")
      print("B: Remove an atom to the list")
      print("C: Print the list")
      print("D: Sort the list")
      print("E: the length of the list")
      print("F: edit an atom")
      print("X: Exit the program")
      print("\n")
      choice = input("Choose an option :")
      
      if choice =="A":
          name =input("enter the name of an atom to add:")
          atoms.append(name)
          print(name,"has been added to the list")

      

      if choice == "B":
          name= input("enter the name of an atom to remove: ")
          atoms.remove(name)
          print(name,"has been removed from the list")

      if choice== "C":
          print (atoms)

      if choice== "D":
          atoms.sort()
          print(atoms)

      if choice== "E":
          print(len(atoms))

      if choice=="F":
         print(atoms)
         i=int(input("wich atom do you want to change?"))
         atoms[i]=input("enter a new atom")
         print(atoms)