| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| AppClass.py | 2023-02-20 | 1.8 kB | |
| AppClass.sm | 2023-02-20 | 1.6 kB | |
| checkstring.py | 2023-02-20 | 1.6 kB | |
| Makefile | 2023-02-20 | 2.7 kB | |
| README.txt | 2023-02-20 | 698 Bytes | |
| Totals: 5 Items | 8.4 kB | 0 | |
Python Example 1
This state machine "recognizes" the string 0*1* (which includes the
empty string).
+ Building
----------
NOTE: Smc.jar must be built and installed.
Unix & Windows:
$ make checkstring
+ Executing
-----------
Unix & Windows
$ python checkstring.py <string>
Try several different strings, such as:
$ python checkstring.py ""
-> acceptable
$ python checkstring.py 000
-> acceptable
$ python checkstring.py 00011
-> acceptable
$ python checkstring.py 111
-> acceptable
$ python checkstring.py 000111100
-> unacceptable
$ python checkstring.py 00011a1b10c0
-> unacceptable