Also habe ich eine Rechteckschleife erstellt, sodass ich diesen Code verwendet habe, wenn eine Zeile fertig ist, wenn der nächste Buchstabe des ersten Buchstabens < /p>
beginnt: < /p>
`Column=int(input("How many characters you want in a row"))
< /code>
Row=int(input("How many rows you want"))
< /code>
Temp=Column
< /code>
Num=97
< /code>
while(Row>0):
< /code>
while(Column>0):
print(chr(Num),end="")
Column=Column-1
Num=Num+1
Row=Row-1
Column=Temp
print()
< /code>
But when I run the code it shows this:
How many characters you want in a row 5
How many rows you want 4
abcde
fghij
klmno
pqrst
I wanted the code to go like:
abcde
bcdef
cdefg
So what should I improve?
Wenn Sie eine Rechteckschleife machen, aber alles, was für eine Reihe abgeschlossen ist, beginnt der nächste Buchstabe d ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post