Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am wondering how to use while loop to read the file with different types and grades. Please help with it Filename: avg_grade.py Input files:

I am wondering how to use while loop to read the file with different types and grades. Please help with it image text in transcribed
image text in transcribed
Filename: avg_grade.py Input files: Download ds 2000 grades. xt save it in the same directory as your avg grade.py file. As you may know, we don't have your DS2000 grade stored on Canvas, because Laney hates it, but you can figure it out anytime you like -- and that's what we'll do for this homework! The input data file has the following format: - Assignment Type (HW, Quiz, or Viz) - Grade on that assignment Using a while loop, read in the contents of the file, and compute three things: - Average HW score - Average Quiz score - Overall DS2000 number grade (a weighted average where homework is worth 75%, quizzes are worth 20%, and mini-viz is 5% ) Print out each of these things to the user, rounded to 2 digits past the decimal place. For full documentation credit, write one test case in a comment at the top of your file using the format shown below (but with your own example.) Test case: HW grades - 90, 85, 95. Avg=90 Quiz grades - 100, 90. Avg =95 Viz grade =90 overall average =(.75)(90)+(.20)(95)+(.85)(90)=91 Assume that there could be any number of homeworks, any number of quizzes, but only one Viz grade. The input data file has some made-up data in it. But we encourage you to also use your code to figure out The input data file has some made-up data in it. But we encourage you to also use your c

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

6. Have you used solid reasoning in your argument?

Answered: 1 week ago