Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a Python program that processes a file called inp.txt whose structure is described previously, to produce output with the following structure ( however ,

Write a Python program that processes a file called inp.txt whose structure is described previously, to produce output with the following structure (however, your program is allowed to print these lines in any order).
For each unikey, give the number of units where the students mark in that unit in 2016 is at least 85. If none of the students results in that year are in the required range, show 0 as the number of units. You may assume that every student mentioned in the file studied one or more subjects in 2016.
If there are no rows other than the header in the input, nothing should be printed at all.
So when run with the file given above as input, the output should be (in some order):
jsmi30310
ocat30311
tgol21450
pdon12342
In 2016, pdon1234 has grades of 85 or more in 2 units (engl1001 and math1001). ocat3031 has 85 or more in 2016 in 1 unit (math1001); note that this students mark in chem1101 is below 85, and the high score in engl1001 is in a different year.

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

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions