Created
January 5, 2026 09:12
-
-
Save bgrenet/2050b0a68bc2508a03c5647ee41d0744 to your computer and use it in GitHub Desktop.
Exemples cours 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: écrit01 | |
| source code: | | |
| input: '' | |
| blank: ' ' | |
| start state: q0 | |
| table: | |
| q0: | |
| ' ': {write: 0, R: q1} | |
| q1: | |
| ' ': {write: 1, R: q0} | |
| positions: | |
| q0: {x: 329.64, y: 252.94} | |
| q1: {x: 469.3, y: 247.11, fixed: false} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: incrément | |
| source code: |- | |
| input: '101011' | |
| blank: ' ' | |
| start state: droite | |
| table: | |
| droite: | |
| [0, 1]: R | |
| ' ': {L: retenue} | |
| retenue: | |
| 1: { write: 0, L } | |
| [' ',0]: { write: 1, L: gauche } | |
| gauche: | |
| [0, 1]: L | |
| ' ': { R: fin } | |
| fin: | |
| positions: | |
| droite: {x: 187.3, y: 211.38} | |
| retenue: {x: 351.35, y: 215.69} | |
| gauche: {x: 505.35, y: 216.41} | |
| fin: {x: 683.49, y: 217.69} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: palindromes | |
| source code: |- | |
| input: 'ABBABBA' | |
| blank: ' ' | |
| start state: '?' | |
| table: | |
| '?': | |
| A: {write: ' ', R: luA} | |
| B: {write: ' ', R: luB} | |
| ' ': {R: oui} | |
| luA: | |
| [A,B]: R | |
| ' ': {L: 'A?'} | |
| luB: | |
| [A,B]: R | |
| ' ': {L: 'B?'} | |
| 'A?': | |
| [A, ' ']: {write: ' ', L: '←'} | |
| B: {R: non} | |
| 'B?': | |
| A: {R: non} | |
| [B, ' ']: {write: ' ', L: '←'} | |
| '←': | |
| [A,B]: L | |
| ' ': {R: '?'} | |
| oui: | |
| non: | |
| positions: | |
| '?': {x: 172.75, y: 233.71} | |
| luA: {x: 302.99, y: 134.29} | |
| luB: {x: 293.21, y: 331.69} | |
| A?: {x: 486.06, y: 136.14} | |
| B?: {x: 476.52, y: 329.85} | |
| ←: {x: 388.11, y: 240.88} | |
| oui: {x: 167.35, y: 391.66} | |
| non: {x: 582.29, y: 235.27} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: parenthèses | |
| source code: | | |
| input: 'aababb' | |
| blank: ' ' | |
| start state: '?' | |
| table: | |
| '?': | |
| X: R | |
| a: { write: X, R: '↝'} | |
| b: { R: non } | |
| ' ': { R: oui } | |
| '↝': | |
| [a, X]: R | |
| b: { write: X, L: '↜' } | |
| ' ': { R: non } | |
| '↜': | |
| [a, X]: L | |
| ' ': { R: '?' } | |
| oui: | |
| non: | |
| positions: | |
| '?': {x: 194.48, y: 236.58} | |
| ↝: {x: 454.74, y: 237.85} | |
| ↜: {x: 326.32, y: 120.1} | |
| oui: {x: 190.49, y: 344.08} | |
| non: {x: 332.38, y: 348.04} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment