Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Note: Below are instructions for Task 1 and Task 2 of this homework. Please be sure to follow these specific instructions. The grading rubric is

Note: Below are instructions for Task 1 and Task 2 of this homework. Please be sure to follow
these specific instructions. The grading rubric is based on these specific instructions. Your Python
script might be correct, but you receive no credit because you did not follow the instructions.
Task 1(of 2): Compute and Print Grades
Download students grades from the community site, Grades.txt. The file has 6 columns:
student Index number and the average RATs, CFUs, HWs, Project and Exams grades for a set of
students. Each student has an Index number that is a whole number between 1 and 300 and their
final grade can be computed as a percentage based on the following formula:
Grade %=0.05*RAT +0.15*CFU +0.15*HW +0.20*Project +0.45*Exam
Their letter grade can then be assigned based on the following grade scale:
90<= Grade %<=100 A
80<= Grade %<90 B
70<= Grade %<80 C
60<= Grade %<70 D
0<= Grade %<60 F
Write a Python script called HW3p2_Task1_UCusername.py that will read in the Student Index
Number and the data from the Grades.txt file. Your script should then calculate the Grade
Percentage and determine the Letter grade based on the percentage for each student. The Student
Index Number, their grade percentage and letter grade should be stored to a new file
(LetterGrade.txt) for all students. A sample output for the first three students is shown below.
Note: it is not necessary for your columns to be nicely aligned. If you want to align columns,
you can control the width of each column in your .write command as follows: {0:15} will make
item 0 in the format list take up 15 spaces. Similarly, {2:10.2f} will make item 2 in the format
list take up 10 spaces with two places behind the decimal point.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

Evaluate three pros and three cons of e-prescribing

Answered: 1 week ago