Here is a Python script that will print "💖I love you💕" 100 times with a simulation:
import time
for i in range(100):
print("💖I love you💕")
time.sleep(0.5) # add a delay of 0.5 seconds between each print statement
This script uses a for loop to repeat the print statement 100 times. The 'time.sleep(0.5)' function is used to add a delay of 0.5 seconds between each print statement, simulating the passage of time. You could also use a while loop with a counter variable that decrement by one each time in the loop and stop when the counter reach 0
import time
counter = 100
while counter > 0:
print("💖I love you💕")
time.sleep(0.5)
counter -= 1
You can also use recursive function.
import time
def recursive_print(n):
if n == 0:
return
print("💖I love you💕")
time.sleep(0.5)
recursive_print(n-1)
recursive_print(100)
Please note that this script will print the message 100 times and pause for 0.5 seconds between each message, simulating the passage of time.
If you want "I love you" to be printed 1000 times, you can replace 100 with 1000.
I trust this helps you! if you have any query you can ask me.
