Write a Python script /app/toposort.py that reads a dependency specification from stdin and outputs either a…
Write a Python script /app/toposort.py that reads a dependency specification from stdin and outputs either a…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). Input format (stdin): - Each line defines one task or one dependency. - A task definition line has the…
The task
**Input format (stdin):** - Each line defines one task or one dependency. - A task definition line has the format: `TASK <name>` where `<name>` is a non-empty string containing only ASCII letters, digits, hyphens, and underscores. - A dependency line has the format: `<A> -> <B>` meaning A depends on B (B must run…
Part of ai-and/termgrade-environments.