Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is the scores.txt file use this to write the code the one on the instructions is just a sample. Code must be in python.

image text in transcribed
image text in transcribed
This is the scores.txt file use this to write the code the one on the instructions is just a sample. Code must be in python. Thanks
image text in transcribed
OLA 7: Calculate Student Averages Due: Mon Nov 5, 2018 by 11:59 PM-may be turned in until Nov 12 by 11:59 PM with reduced points (per Open Lab- Project guidance found in the course syllabus) Assignment id: ola7 Assignment type: Project Required Files: ola7.py, myout.log Lab description For this lab, write a complete Python script that reads Student ID numbers and grades from a file, calculates the average of the grades, and outputs the results to the screen and to a file. The input will come from a text file named scores.txt, which consists of multiple sets of a student ID number followed by three test scores. The contents of a file containing the scores of four students are shown below (the student ID number is of the form MXX where XX is a two-digit number): MO1 76 89 82 91 81 83 92 93 90 M04 86 91 The output of the above data to the screen will be of the following form (note: 2 decimal places): Student MO1 average is 82.33 Student M02 average is 85.00 Student M03 average is 91.67 Student M04 average is 88.33 Only the student ID number and average score (separated by a space and to 2 decimal places) are written to the output file: MO1 82.33

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

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

More Books

Students also viewed these Databases questions

Question

=+ c. a company president deciding whether to open a new factory

Answered: 1 week ago