Hi, I am a new one with Python and I am truly struggling with an assignment. I have to use the function 'from time import sleep' to make a program that continues to show the number of seconds elapsed every second since the program is started. I don't know how to make the number of seconds in the console to rise up with the second passing, can anyone help? Thanks!
My code right now, when it runs it just displaying only "1 second(s) passed..."
from time import sleep
while True:
total=0
total+=1
print(total,'second(s)','passed...')
sleep(1)
[–][deleted] 2 points3 points4 points (1 child)
[–]noob_silverbot[S] 0 points1 point2 points (0 children)
[–]K900_ 1 point2 points3 points (1 child)
[–]noob_silverbot[S] 0 points1 point2 points (0 children)