atelier:coding_gouter:ppour:variables
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| atelier:coding_gouter:ppour:variables [2026-04-22 15:07] – removed - external edit (Unknown date) 127.0.0.1 | atelier:coding_gouter:ppour:variables [2026-04-22 15:09] (current) – Andrii Kurdiumov | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Variables ====== | ||
| + | The variables is things where you can have some values, like numbers, text, maybe more complex things like pictures, files, links, video, etc. You can say that anything can be stored in variables, but usually there following ways how variables are used. | ||
| + | |||
| + | {{tablelayout? | ||
| + | ^ Role ^ Description | ||
| + | | Fixed value | Initialized once and not changed thereafter. | ||
| + | | Stepper | ||
| + | | Walker | ||
| + | | Follower | ||
| + | | Most-recent holder | ||
| + | | Most-wanted holder | ||
| + | | Gatherer | ||
| + | | One-way flag | A two-valued variable that, once changed from its initial value, never reverts (e.g., an error flag set to True and never reset). | ||
| + | | Temporary | ||
| + | | Organizer | ||
| + | | Container | ||
| + | |||
| + | We will eventually show each of this usage during the course. | ||
| + | |||
| + | Example of variable declaration and usage | ||
| + | |||
| + | < | ||
| + | a = 10 | ||
| + | b = 100 | ||
| + | afficher(" | ||
| + | afficher(" | ||
| + | x = 4 | ||
| + | y = x*x - 9*x + 14 | ||
| + | afficher(" | ||
| + | afficher(" | ||
| + | afficher(" | ||
| + | </ | ||