Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
lehrkraefte:blc:informatik:ffprg1-2020:stringvar [2022/03/24 13:33] Ivo Blöchliger [Text Quadrate] |
lehrkraefte:blc:informatik:ffprg1-2020:stringvar [2022/03/24 13:36] Ivo Blöchliger [Text Quadrate] |
||
---|---|---|---|
Line 100: | Line 100: | ||
</ | </ | ||
+ | Die Idee | ||
<code python textquadrat3.py> | <code python textquadrat3.py> | ||
a = " | a = " | ||
- | w = a + a[-2:: | + | w = a + a[-2:: |
for i in range(len(a)): | for i in range(len(a)): | ||
wort = "" | wort = "" | ||
for j in range(len(a)): | for j in range(len(a)): | ||
- | wort += w[i+j] + " " | + | wort += w[i+j] + " " |
print(wort) | print(wort) | ||
</ | </ |