![]() ![]() Print("Elements beginning with the letter I: Iron Iodine Iridium(N/A) Indium") Print("Elements beginning with the letter H: Hydrogen Helium Hafnium(N/A) Hassium(N/A) Holmium(N/A)") Print("Elements beginning with the letter G: Gallium Germanium Gold(N/A) Gadolinium(N/A)") Print("Elements beginning with the letter F: Fluorine Francium(N/A) Fermium(N/A)") Print("Elements beginning with the letter E: Europium(N/A) Einsteinium(N/A)") ![]() ![]() Print("Elements beginning with the letter D: Dubnium(N/A) Darmstadtium(N/A) Dysprosium(N/A)") Print("Elements beginning with the letter C: Carbon Chlorine Calcium Chromium Cobalt Copper Cadmium Caesium(N/A) Copernicium(N/A) Cerium(N/A) Curium(N/A) Californium(N/A)") Print("Elements beginning with the letter B: Berylium Boron Bromine Bismuth(N/A) Bohrium(N/A") Print("Elements beginning with the letter A: Aluminium Argon Arsenic Astatine(N/A) Americium(N/A) Actinium(N/A)") It checks what letter the input_ variable has and displays the list of that letter. #This very big chunk of code is the entire alphabetical list system. Input_ = input("Please enter the name or first capital letter of an element:") #This is the variable that the user inputs the element they want to find or the letter to find an element. And if you want to see Fluorine and then after Hydrogen, you have to restart the program to see Hydrogen.") For example if you want to see F and after you want to see A, you have to restart the program to see A. To see all of the letter lists you have to type the letters in alphabetical order. Any element with N/A next to it is not in the index at the moment. Also you are able to type a capital letter to see lists of elements beginning with that letter. Print("Welcome to my element index! You must enter the name of an element with a capital letter. #This is the intro sentence that explains the way my element index works. This code is a digital periodic table that I am working on, but it is taking forever as it is very long and I would like to shorten it. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |