Due: Monday, March 4, 2019
Points: 25
The output for the same input as in question 1 would look like this (input is in red).
Chemical composition? C2H5OH↵
The atomic weight of C2H5OH is 46.08
The elements are Carbon, Hydrogen, and Oxygen
Chemical composition? H2O↵
The atomic weight of H2O is 18.02
The elements are Hydrogen and Oxygen
Chemical composition? HO↵
The atomic weight of HO is 17.01
The elements are Hydrogen and Oxygen
Chemical composition? Ho↵
The atomic weight of Ho is 164.93
The element is Holmium
Chemical composition? SN3↵
The atomic weight of SN3 is 74.1
The elements are Nitrogen and Sulfur
Chemical composition? Sn3↵
The atomic weight of Sn3 is 356.13
The element is Tin
Chemical composition? control-D↵
Call your program “longcompound.py”.
|
You can also obtain a PDF version of this. Version of February 27, 2019 at 8:41PM |