Reference no: EM132112752
Purpose: To practice creating and using tuples.
In this exercise, you will create a program that can display information about the first ten elements in the periodic table. The periodic table of is a table of the chemical elements.
It is organized by the element's atomic number (the number of protons the element has) and contains information about each element, such as atomic weight.
Create a list of tuples that holds the information about the first 10 elements in the periodic table (just write the list of tuples as a literal, do not try to input it from the console). Each tuple will include: the atomic symbol, name, number, and weight. The data for each element is provided in the table below.
SYMBOL |
NAME |
ATOMIC NUMBER |
WEIGHT |
H |
Hydrogen |
1 |
1.008 |
He |
Helium |
2 |
4.003 |
Li |
Lithium |
3 |
6.940 |
Be |
Beryllium |
4 |
9.012 |
B |
Boron |
5 |
10.810 |
C |
Carbon |
6 |
12.011 |
N |
Nitrogen |
7 |
14.007 |
O |
Oxygen |
8 |
15.999 |
F |
Fluorine |
9 |
18.998 |
Ne |
Neon |
10 |
20.180 |
Now your program should prompt the user to enter an atomic number between 1 and 10 from the console. The program will then display information about the element with that atomic number on the console.
Sample Output:
Here is an example of what your program's console output should look like. Italic text was entered by the user.
Periodic Table Information
Which element would you like to know about?
Enter the atomic number now: 7
Symbol : N
Name: NItrogen
Number: 7
Weight: 14.007
(This is Python Programming 3.5 Anaconda)