The book says:
“Your challenge in this exercise is to turn this sample module into a more robust and generic FSM Python class.”
That seems pretty vague to me. Not sure how to proceed.
The book says:
“Your challenge in this exercise is to turn this sample module into a more robust and generic FSM Python class.”
That seems pretty vague to me. Not sure how to proceed.
You are getting stuck on a particular word “FSM.” Don’t focus on it and make;
Class ContainingStaticCode(Object):
# static code that won't change, directives that will always be used
def DoSomething(self):
giveMeAString = "Hey Mate :)"
So change the sample, so that there is no repetition in code and use classes is my guess.
Cheers tc
btw finite machines are like “cars”, all the parts have to be made to do the job
Here is the very simplest way to do it: