Home>

I'm new to python.
I wrote the following code, but I get an error and am in trouble.
Why?
Kind person, please tell me!

〇 Code

import pyautogui
import time

def sleep_time (time):

time.sleep (time)

sleep_time (5)

pyautogui.scroll (-10000)

sleep_time (3)

pyautogui.moveTo (100, 200)

〇 Error message

Traceback (most recent call last):
File "C: \ Users \ cjrr6 \ Desktop \ scroll.py", line 8, in
sleep_time (5)
File "C: \ Users \ cjrr6 \ Desktop \ scroll.py", line 6, in sleep_time
time.sleep (time)
AttributeError:'int' object has no attribute'sleep'