Download CS 211 – Spring 2017 Lab 4: Molar Mass

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Nihonium wikipedia , lookup

Promethium wikipedia , lookup

Livermorium wikipedia , lookup

Neptunium wikipedia , lookup

Lawrencium wikipedia , lookup

Seaborgium wikipedia , lookup

Isotope wikipedia , lookup

Tennessine wikipedia , lookup

Oganesson wikipedia , lookup

Dubnium wikipedia , lookup

Periodic table wikipedia , lookup

Abundance of the chemical elements wikipedia , lookup

Chemical element wikipedia , lookup

Ununennium wikipedia , lookup

History of molecular theory wikipedia , lookup

Unbinilium wikipedia , lookup

Extended periodic table wikipedia , lookup

Transcript
CS 211 – Spring 2017
Lab 4: Molar Mass
Learning Objectives: in Excel
- Validation of Data using a drop-down box
- Use of IF() to determine how data is calculated and displayed
- Use of VLOOKUP() to obtain constant data from a table on a second sheet
General Description:
Create a Molar Mass Calculator to calculate the Molar Mass of a chemical compound of up to 7
elements.
Molar Mass is the sum of the Atomic Mass of each atom in the compound. The Atomic Mass of an atom
is stored in a chart of the elements.
When there are multiple atoms of the same element, the element need only be listed once along with
the number of atoms.
Examples: Carbon Dioxide (CO2). Note the number of Carbon atoms is empty, and so is assumed to be 1.
Also note on rows 6-10, the Element is BLANK, and so the Atomic Weight and Subtotals are EMPTY.
When the user selects another atom in A6-10, Columns C and D should be populated.
The second example is for Ethanol (C2H6O).
Specifications:
- The list of elements can be found on the course website at:
https://www.cs.uky.edu/~kwjoiner/cs221/labs/lab4_elements.xlsx .
Open this spreadsheet and copy/paste the entire table to Sheet2 of your lab.
Note that on row 3 the element name is a single blank (“ “), and zeros are recorded for the
numbers. This “element” is added so that BLANK can be selected on the drop-down box later.
- Rename Sheet2 to Elements and Sheet 1 to Calculator.
- A4 should be a drop-down box based on the values of column A on the Elements sheet. Note
that the first row included is row 3. To make copy/paste work better, use absolute referencing
when specifying the values for the drop-down (ex: $A$4 instead of A4)
- C4 is the Atomic Weight of the element specified in A4. When A4 is blank (“ “), leave C4
empty(“”). Note that A4 will never be empty (“”), but will be a single blank (“ “).
- D4 is the total Atomic Weight for the element multiplied by the number of atoms entered by the
user in B4. There are three possible scenarios:
o When A4 is blank: D4 should be empty
o When A4 is not blank:
 When B4 is empty: Assume there is 1 atom, so D4 is just of copy of C4
 When B4 is not empty: multiply B4 by C4
The point of this is user friendliness. When the number of atoms is only 1, the user doesn’t
actually have to type in the 1…just leave the number of atoms blank and it will assume 1.
- Once you have completed the formatting and coding for row 4, you should be able to copy row
4 to rows 5 through 10 to complete those rows. Check/Test them to be sure the paste worked
correctly.
- D11 is just the sum of D4 through D10.
Formatting: format as shown above, including:
- Make the user inputs (columns A and B) a different color than the calculated/looked-up values.
- Add Borders and Merge cells as shown.
- Include the title rows with your name and section number.