I101: Introduction to Informatics

Lab 10: Simple programming in Excel and Measuring Uncertainty

Contents


Detailed Instructions for Tasks

Introduction

Professor Matic is a new IUB faculty who not familiar with the letter grading system. He does not know how to translate grades from percentages into letters. The School of Informatics is hiring I101 students to develop the ultimate application to transform percentage score into letter grades.

You need to edit an Excel spreadsheet (i) with an algorithm to transform percentage scores into letter grades and (ii) create another algorithm to identify the students with grades above the average. You also need to (iii) Calculate the probability distribution for each letter grade and (iv) Produce a flowchart for algorithm (i) and publish it in your Blog.

Finally, you need to (v) compare the Shannon entropies of three professors: Matic, Churchill and Mussolini. You will find information about these professors on the second book of the spreadsheet. The grade probability distribution for the three professors is provided there. You should briefly comment your results on the spreadsheet and (vi) answer the following two questions: Question 1: In which professor's class (Matic, Chruchil, and Mussolini) is the final grade more uncertain? Which one is more certain?, Question 2: Does the Shannon entropy help in deciding which of the three courses to take? How?

You can download Professor Matic's unfinished spreadsheet of grades here. In this lab you will work on your own and will not be taken through the steps. However, below you will find some useful information that will help you complete your task, so read through it carefully.

NOTE: The excel spreadsheet provided has two books, you'll need them both

some useful background information

the if statement


IF

 

Returns one value if a condition you specify evaluates to TRUE and another value if it evaluates to FALSE.

 

Use IF to conduct conditional tests on values and formulas.

 

Syntax

 

IF(logical_test,value_if_true,value_if_false)

 

Logical_test is any value or expression that can be evaluated to TRUE or FALSE. For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE.

 

Value_if_true is the value that is returned if logical_test is TRUE. For example, if this argument is the text string "Within budget" and the logical_test argument evaluates to TRUE, then the IF function displays the text "Within budget". If logical_test is TRUE and value_if_true is blank, this argument returns 0 (zero). To display the word TRUE, use the logical value TRUE for this argument. Value_if_true can be another formula.

 

Value_if_false is the value that is returned if logical_test is FALSE. For example, if this argument is the text string "Over budget" and the logical_test argument evaluates to FALSE, then the IF function displays the text "Over budget". If logical_test is FALSE and value_if_false is omitted, (that is, after value_if_true, there is no comma), then the logical value FALSE is returned. If logical_test is FALSE and value_if_false is blank (that is, after value_if_true, there is a comma followed by the closing parenthesis), then the value 0 (zero) is returned. Value_if_false can be another formula.

 

 

1

2

3

4

A

Score

45

90

78

 

Formula

Description (Result)

=IF(A2>89,"A",IF(A2>79,"B",IF(A2>69,"C",IF(A2>59,"D","F"))))

Assigns a letter grade to the first score (F)

=IF(A3>89,"A",IF(A3>79,"B",IF(A3>69,"C",IF(A3>59,"D","F"))))

Assigns a letter grade to the second score (A)

=IF(A4>89,"A",IF(A4>79,"B",IF(A4>69,"C",IF(A4>59,"D","F"))))

Assigns a letter grade to the third score (C)

 

In the preceding example, the second IF statement is also the value_if_false argument to the first IF statement. Similarly, the third IF statement is the value_if_false argument to the second IF statement. For example, if the first logical_test (Average>89) is TRUE, "A" is returned. If the first logical_test is FALSE, the second IF statement is evaluated, and so on.

The letter grades are assigned to numbers using the following key (in the lab we shall use a different key).


If Score is

Then return

Greater than 89

A

From 80 to 89

B

From 70 to 79

C

From 60 to 69

D

Less than 60

F

 


using log

LOG

 

Returns the logarithm of a number to the base you specify.

 

Syntax

 

LOG ( number ,base)

 

Number is the positive real number for which you want the logarithm.

 

Base is the base of the logarithm. If base is omitted, it is assumed to be 10.

 

Example

 

 

1

2

3

4

A

B

Formula

Description (Result)

=LOG(10)

Logarithm of 10 (1)

=LOG(8, 2)

Logarithm of 8 with base 2 (3)

=LOG(86, 2.7182818)

Logarithm of 86 with base e (4.454347)


drawing a flowchart

  1. On the Drawing toolbar  (toolbar: A bar with buttons and options that you use to carry out commands. To display a toolbar, click Customize on the Tools menu, and then click the Toolbars tab.) , click AutoShapes , point to Flowchart , and then click the shape you want.
  2. Click where you want to draw the flowchart shape.
  3. If you want to add additional shapes to the flowchart, repeat steps 1 and 2, and then arrange them in the order you want.
  4. Add connectors between each of the shapes
  5. Change the line style or add color to the connectors:
  6. Add color or fills to the shapes.

  7. If you want to add a gradient, patterned, textured, or picture fill, click Fill Effects, and then click the tab you want and select options


Check that you have completed your deliverables before you leave.


For more information contact Luis Rocha or Santiago Schnell.
Last Modified: April 9, 2007