lab16spring - Lab 16 Converting Scores Last Modified Key...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lab 16: Converting Scores Last Modified 03/26/2009 Key Concepts: file input, appending files, formatting output One very handy use of computer programs is to reformat data quickly. That's what we're going to do here. The file lab16-input.txt contains several exam scores. Due to a grading error, all of these exam scores need to be increased by 3 points. We would also like to put letter grades on the scores. Begin by writing a function that takes in a numeric grade and converts it to a letter grade using a standard grading scale (e.g. 90+ == A, 80-89 == B, 70-79 == C, 60-69 == D, 0-59 == F). Write a program that does the following: 1. Reads all of the scores from the file 2. Creates a new file called abc123 -adjusted-scores.txt (where you fill in your username in place of "abc123") that contains lines with the original scores, the adjusted scores, and the matching letter grades for the adjusted scores. Print scores in a tabular format using the formatting features in iomanip and display all scores with one decimal place. 3. Computes the mean of the scores before and after the adjustment.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/10/2011.

Page1 / 2

lab16spring - Lab 16 Converting Scores Last Modified Key...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online