Scrolling Text Help
Hello there. Please help me on how to make scrolling text for my projects.
Answered by Bookie0 (6360) [earned 5 cycles]
do you mean the typewriter effect? if yes, here's how to:
import sys, time # imports def sp(str): # putting this in a function for letter in str: sys.stdout.write(letter) sys.stdout.flush() time.sleep(0.04) # change the number to make it faster/slower based on ur preference print()
will output hello in a nice typewriter effect. try it out! ;)
Here you go!
import time def typewriter(text, delay=0.1): for letter in text: print(letter, end='', flush=True) time.sleep(delay) print() typewriter("I'm being typed at a rate of 0.1 seconds") typewriter("I'm being typed at a rate of 0.05 seconds", 0.05)