Ted works as a computer programmer at Minecraft Inc. His boss has just given him an important assignment to update the code for the minecart tracks by the end of April. However, he has recently had to self-isolate due to Covid-19 and has left the code for the tracks BACK AT WORK!! He has the shorthand for the tracks he's supposed to look at, and where the carts are suppost to end up, but not the actual code.
He knows that:
Help Ted by writing a class for the tracks that interact with the provided Minecart class as shown above. And then write a function that will take a list of the shorthand tracks and:
True.mine_run(["-->", "-->", "-->", "<--", "<--", "<--"]) ➞ True
mine_run(["-->", "<--", "-->", "-->", "<-->", "---"]) ➞ 1
N/A