CSE 1111 Pre Lab 5

advertisement
CS&E 1111 PRE LAB 5: BOOLEAN LOGIC & CHARTING
20 POINTS
PURPOSE:
The purpose of this lab is to apply decision making skills to our worksheets. You will be working with
Relational Operators and Boolean Logical functions including AND, OR and NOT. The in-lab portion will
also expand your knowledge and use of the Excel Charting tools.
LAB 5: PRE-LAB ASSIGNMENT –COMPLETE BEFORE COMING TO LAB:
PART 1 – BOOLEAN LOGIC – TEMPERATURE PROBLEM
You have been hired by the local NBC affiliate news team to assist in compiling historical weather data
for use during broadcasts. A workbook has already been setup named Temperature.xlsx that contains
some initial data. Your assignment is to complete this worksheet as directed.

Download the starting file Temperature.xlsx from the Carmen site.

Write a formula in cell E2, which can be copied down the column, to determine if the temperature
for this day was above average. The formula should result in a True/False (Boolean) value. Copy the
formula down the column.

o
Do you want a Boolean value or an arithmetic value? Here it appears that the value displayed is
True/False - a Boolean value. To obtain a Boolean value you will need to use a either a
Relational operator or a Boolean function.
o
Boolean functions combine or manipulate a boolean value or values to create a single boolean
value. For example, Boolean functions can be used to answer questions like “Are all
temperatures less than 50 degrees?” or “Is at least one temperature over 70?”. Relational
operators compare two quantities and result in a boolean value, answering questions such as “Is
the first date on the list after Februay 1st?” or “Is the temperature on 7/1/2010 less than 60”?
o
In this case, you are comparing two quantities: the 8am temperature and the average
temperature. So in this case you would use a relational operator(i.e., >, <, >=, <=, =, <>).
Write a formula in cell G11 to determine (True/False) if all the days had above average
temperatures.
o

The Boolean logical operator AND will result in a True value if all of the arguments are True. In
this case, we want to see if all of the Boolean values in column E (whether or not the
temperatures are above average) are True.
Write a formula in cell G12 to determine (True/False) if at least one day in spring had above
average temperature.
o
CSE1111
Consider only the rows containing the data for spring (4 and 5). The Boolean logical function OR
returns true if at least one of its arguments are True. In this case, you can use the OR function to
determine if either of the values for above average temperature (column E) in spring contain
True values
Pre-lab 5
Page 1

Write a formula in cell F2 to determine (True/False) if this was both a spring day and did not have an
above average temperature. Copy the formula down the column.
o
Determine if the corresponding day (row 2) is in spring. Relational expressions can be used with
text by using quotes around the text. For example: Z29=”Hello” will evaluate to True if cell Z29
contains the word Hello.
o
Determine if the corresponding day has above average temperatures (column E). If this value is
True, return a False. If this value is False, return a True. The Boolean logical function NOT will
switch a True to a False, and vice versa.
o
Since both of the above criteria should to be met to obtain a True value, these two criteria can
be nested (combined) with the AND function. Each of the two individual expressions will
become a separate argument i.e. your formula will have this logical structure:
=AND( Is a spring day, does not have above average temperature).

Save your completed workbook to Temperature.xlsx. It should be similar to Figure 1.
Figure 1
PART 2 – USING BOOLEAN LOGIC & CHARTING – UTILITY ANALYSIS
With energy costs getting higher every day, your boss has asked you to analyze your company’s
budgeted and actual utility costs over the past year. The file UtilityAnlaysis.xlsx has been previously
setup containing the budget and actual expenditures for January through December. Also included is
the average difference between inside and outside temperatures for that month as an absolute value.
Your job will be to complete this analysis:

Copy the file UtilityAnlaysis.xlsx from Carmen.

In cell E3, write an Excel formula to determine the value of the cost overruns (budget vs. actual
expenditure) for the month of January. This value should be positive if the actual amount spent
exceeds the budget. Copy the formula down the column for months February through December.

In cell F3, write an Excel formula to determine (True/False) if the actual expenditures exceeded the
budget for this month. Copy the formula down the column.
CSE1111
Pre-lab 5
Page 2

In cell E17, write an Excel formula to determine (True/False) if the expenses for all months were
over budget.

In cell E18, write an Excel formula to determine (True/False) if at least one of the months
experienced a cost overrun (over budget).

In cell E19, write an Excel formula to determine (True/False) if none of the months were over
budget.

In cell E20, write an Excel formula to determine (True/False) if both winter and summer each have at
least one month with cost overruns. Assume the summer months are June, July and August and
winter months are January, February and March.

Use Conditional Formatting to highlight values in cells F3:F14, if they are True. Use the default (pink,
with red text) format.

Use Conditional Formatting to insert light blue data bars in cells E3:E14. The longer the bar the
higher the cost overrun.

On the same worksheet adjacent to this table, create a chart showing the values of the cost
overruns for each month. Use an appropriate chart that compares discrete values. Be sure your
chart contains a title and axis labels.

Insert a second chart, just below the first chart This chart should plot the functional relationship
between average temperature differences from inside/outside versus the budgeted amount for
utilities. Use an appropriate chart that shows a functional relationship. Be sure your chart contains
a title and appropriate axis labels.

Save the file UtilityAnalysis.xlsx
SUBMISSION LIST
o
Temperature.xlsx.
o
UtilityAnalysis.xlsx
CSE1111
Pre-lab 5
Page 3
Download