#the list of atoms
atoms=["Hydrogen","Helium","Lithium","Beryllium",
"Boron","carbon","Nitrogen","Oxygen","Fluorine",
"Neon","Sodium","Magnesium","Aluminium","Silicon","Phosphorus","Sulfur","Chlorine","Argon",
"Potassium","Calcium","Scandium","Titanium","Vanadium","Chronium","Manganese","Iron","Cobalt"
,"Nickel","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 from the list")
    print("C: Print the list")
    print("D: Sort the atoms in 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":
        i=int(input("which atom do you want to change? "))
        atoms[i]=input("enter a new atom")
        print(atoms)