-4

Im not sure how to print this statement every minute, or a certain time limit. I wanted to search about it online but I thought people on SO were more relevant.

I have no idea in what to do lol

import time
while True:

    print("This prints once a minute.")

    time.sleep

I want it to print every second or minute

Siavas
  • 4,992
  • 2
  • 23
  • 33
Anonymous
  • 135
  • 9

2 Answers2

1

Almost there

change time.sleep to

time.sleep(10)

That will sleep 10 seconds.

hqqns
  • 11
  • 1
0

You need to add a time value after the time.sleep Since you want to print that every minute, and a minute has 60 seconds,

your code would be:

time.sleep(60)
Enoch Han
  • 87
  • 4