zjfz-2019-s393639/automata/Task202.py

14 lines
283 B
Python
Raw Normal View History

2020-01-25 10:59:27 +01:00
#!/usr/bin/python2
# -*- coding: utf-8 -*-
"""
Rozwiązanie zadania 202
"""
def get_number_of_final_states(automaton):
counter = 0
for state in range(automaton.get_number_of_states()):
if automaton.is_final_state(state):
counter += 1
return counter