The input file dept_name.txt contains the full name of one department (the whole file content, stripped, is the value).
Using the departments table, look up the department whose department_name equals that value and print its code and building.
Output exactly one line with two values separated by a single space, in this order:
department_code department_building
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 dept_name.txt in the same folder — The full name of one department (matches departments.department_name)..
primary keyforeign keyarrow points to the referenced columndrag to pan