Write a Python script that reads a weighted grid from a text file and computes the shortest path from a…
Write a Python script that reads a weighted grid from a text file and computes the shortest path from a…: a task in TermGrade Environments: 1,004 executable Linux tasks (Harbor dataset). The script must read from stdin and write to stdout. It must handle arbitrary whitespace (extra spaces, blank…
The task
The script must read from stdin and write to stdout. It must handle arbitrary whitespace (extra spaces, blank lines, tabs) and trailing whitespace. Empty input must produce `NO PATH`. The grid weights file uses Latin-1 encoding and may contain characters >127 in comments; comments start with `#` and extend to end of…
Part of ai-and/termgrade-environments.