from mouse import get_position, move from secrets import randbelow from time import sleep def erratic_movement(screen_width, screen_height): move( randbelow(screen_width), randbelow(screen_height), ) def main(): screen_width = 800 screen_height = 600 while True: erratic_movement(screen_width, screen_height) sleep(randbelow(90)) if __name__ == "__main__": main()