The input file holds a single course_id (e.g. CS1001).
Write a program that lists every section of that course.
For each matching section, output five columns in this order:
sec_idsemesteryearbuildingroom_numberOrder the rows by year ascending, then semester ascending, then sec_id ascending.
If building or room_number is NULL, print an empty string in its place. Print one row per line, columns separated by a single space. If no section matches, print nothing.
Note: Do not hard-code the database name — your program is run against a different database instance for evaluation. The input file is in the same folder as your program.
For the database connection, use these variables:
database = sys.argv[1] # database name, from the command line
user = os.environ.get('PGUSER')
password = os.environ.get('PGPASSWORD')
host = os.environ.get('PGHOST')
port = os.environ.get('PGPORT')
The input is a file named course.txt in the same folder — A single line containing one course_id (e.g. CS1001)..
primary keyforeign keyarrow points to the referenced columndrag to pan