+ 102
Please Change this JavaScript code for python code or C++ ,C
14 Answers
+ 20
// Don't know if this is what you want, but this types each letter one by one similar to your code, though the time delays/effect won't work on SoloLearn. (try to a different editor).
_______________________
import time
dis="thanks 100 follower and 30 like for my code i love you guys and please d't forget follow me and like my code"
for i in dis:
print(i, end="")
time.sleep(0.05)
_______________________
+ 26
Thanks
+ 23
or Java
+ 23
// Don't know if this is what you want, but this types each letter one by one similar to your code, though the time delays/effect won't work on SoloLearn. (try to a different editor).
_______________________
import time
dis="thanks 100 follower and 30 like for my code i love you guys and please d't forget follow me and like my code"
for i in dis:
print(i, end="")
time.sleep(0.05)
_______________________
Cyan This code d't work
+ 22
I can't do in myself
+ 11
Tnx guys
+ 9
Cyan gave a good example but you will also have to add "flush=true" as argument to print statement, to force the buffer to flush immediately whatever it stores ,otherwise it will only print the final statement after summation of delays.
Do it like , print(i, end="", flush=true)
+ 5
Hey ,hello wolrd must good ,melu đđđ
+ 2
guy I suggest you to add this in the if statement this:
document.getElementById('cursor').innerHTML = '';
this makes the cursor disappear when the interval finishes
+ 2
Melu Yes unfortunately, it wont work here in code playground.
Try it to a different Code Editor. I just tried to imitate what you've done in your codeâïž
0
So you want to make the animation with py?
from time import sleep
dis="thanks 100 follower and 30 like for my code i love you guys and please d't forget follow me and like my code"
dis = dis.replace(" ", "_")
dis = dis.replace("", " ").split(" ")
for i in range(len(dis)):
if dis[i] == "_":
dis[i] = " "
for i in dis:
print(i, end = "") # or print(i, end="", flush = True)
sleep(0.05)
Probably, it'll work; sorry it can't print your last |||
0
hi