@PrestonCurtis1 That error message is for Windows, not Linux which Replit uses.
To fix this error I’d suggest two things:
First don’t ever put an import inside a loop, keep it outside of it, e.i.:
import os,time
while True:
...
The clear in os.system("clear") should be replaced with cls because on Windows cls is what clears the screen. If you want to support both operating systems write clear||cls.
I don’t know why that error message is there but Replit uses Linux so Linux commands work. Your OS is irrelevant as your Repl is Linux. Regardless, this clear command works in addition to the other solutions presented:
@PrestonCurtis1 That’s what I mean. Since you’re on a Windows laptop the OS doesn’t recognize the Linux commandclearso you have to use cls or cls||clear instead.
Like @CoderElijah wrote, you can also use the ASCII escape sequence \033c to clear the console