Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective of this homework assignment is to practice functions, lists and files. Problem Description: program generates a list 'Marks' with 3 0 data elements which

Objective of this homework assignment is to practice functions, lists and files.
Problem Description: program generates a list 'Marks' with 30 data elements which is filled with the random numbers between 40 and 99. Then each of these grades categorized as follows in the list Grades:
\table[[Marks,Grade],[Above and equal to 85,A],[Above and equal to 75,B],[Above and equal to 60,C],[Above and equal to 50,D],[Otherwise,F]]
Display the marks and grade in the tabular format with three columns in a file called 'output.txt'.
Your program should consist of main() and all other functions are called by main().
ReadMarks(): Generates the list Marks filled with numbers between 40 and 99 and returns the list to the main()
determineGrades(...): it receives the Marks list and generate a new list called Grades as per above table.
PrintResults(.....): receives the marks and grades list.
Prints the marks and grades in the tabular format and then prints the lowest marks for each grade A, B, C, D.
Sample Output:
\table[[,,,,,,],[hw4.py ,Output.txt ,A],[1,82,B,63,C,98],[2,69,C,88,A,98,A],[3,80,B,54,D,88,A],[4,93,A,81,B,44,F
image text in transcribed

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

MySQL/PHP Database Applications

Authors: Jay Greenspan, Brad Bulger

1st Edition

ISBN: 978-0764535376

More Books

Students also viewed these Databases questions

Question

9. Describe the characteristics of power.

Answered: 1 week ago