system
1
|
|
|
 |
Attention |
Topic was automatically imported from the old Question2Answer platform. |
 |
Asked By |
Anzol8 |
if the user types 4
program shows:
1
12
123
1234
if the user types 9
program shows:
1
12
123
1234
12345
123456
1234567
12345678
123456789
it can’t be just just showing “123456789”, it needs to be a sequence exactly like the one I showed.
system
2
|
|
|
 |
Reply From: |
Gluon |
You need something like this
var toprint : String
for i in 10:
toprint = toprint + str(i)
print(toprint)
it didn’t work, it only prints 123456789.
Anzol8 | 2022-11-27 22:47
No it doesnt it prints exactly what you wanted.
yes it does, thanks, I was just putting the print outside of the for-loop, already fixed it.
Anzol8 | 2022-11-28 02:07