element[keyre sub( '\[( | | )+\]'''value elements[line[ ]element map the atomic number to the element elements[line[ ]element map the symbol to the element print('periodic table of elements' print('by al sweigart al@inventwithpython com' print( while truemain program loop show table and let the user select an element print(''periodic table of elements he li be ne na mg al si cl ar ca sc ti cr mn fe co ni cu zn ga ge as se br kr rb sr zr nb mo tc ru rh pd ag cd in sn sb te xe cs ba la hf ta re os ir pt au hg tl pb bi po at rn fr ra ac rf db sg bh hs mt ds rg cn nh fl mc lv ts og ce pr nd pm sm eu gd tb dy ho er tm yb lu th pa np pu am cm bk cf es fm md no lr''' print('enter symbol or atomic number to examineor quit to quit ' response input(''title( if response ='quit' sys exit( display the selected element' data if response in elements for key in all_columns keyjustified key rjust(longest_column print(keyjustified 'elements[response][key] input('press enter to continue 'exploring the program try to find the answers to the following questions experiment with some modifications to the code and rerun the program to see what effect the changes have what bug do you cause if you change response ='quiton line to response ='quit' what happens if you delete or comment out lines and project #