7 lines
232 B
Python
7 lines
232 B
Python
def get_number_of_final_states(automaton):
|
|
number_of_states = 0
|
|
for state in range(automaton.get_number_of_states()):
|
|
if automaton.is_final_state(state):
|
|
number_of_states += 1
|
|
return number_of_states
|