This in an intro to Al class, the code shouldn’t be complex. It is in Python, co

This in an intro to Al class, the code shouldn’t be complex. It is in Python, code should be basic and avoid using complex syntax.
Test files are provided, it should pass all the tests in both of them, the code will be run through hidden tests so it should pass those too.
Also the code has the general structure and some helper functions, which shouldn’t me modified.