Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung | |||
| de:modul:m319:learningunits:lu03:pycharm [2026/09/10 10:01] – msuter | de:modul:m319:learningunits:lu03:pycharm [2026/09/10 10:03] (aktuell) – [Grundgerüst eines Python-Programms] msuter | ||
|---|---|---|---|
| Zeile 33: | Zeile 33: | ||
| ===== Grundgerüst eines Python-Programms ===== | ===== Grundgerüst eines Python-Programms ===== | ||
| - | Um ein neues Python-Skript zu erstellen, eignet sich dieses | + | Diese Zeilen bilden das Grundgerüst |
| <code python> | <code python> | ||
| - | def main(): | + | def main(): |
| # write the program logic here and remove the line " | # write the program logic here and remove the line " | ||
| - | pass | + | pass # this command does nothing but is required for now |
| - | if __name__ == ' | + | if __name__ == ' |
| - | main() | + | main() |
| </ | </ | ||
| - | |||
| - | Diese Zeilen bilden das Grundgerüst unserer Programme und sind meistens identisch: | ||
| - | |||
| - | | <code python> | ||
| - | | <code python> | ||
| - | | <code python> | ||
| - | | | | | ||
| - | | <code python> | ||
| - | | <code python> | ||