Code
sprite = Sprite('Tobi')
quarky = Quarky()
# imported modules
import time
# User Defined Functions
def Forward():
quarky.runmotor("L", "FORWARD", 100)
quarky.runmotor("R", "FORWARD", 100)
time.sleep(1)
quarky.stopmotor("L")
quarky.stopmotor("R")
def Backward():
quarky.runmotor("L", "BACKWARD", 100)
quarky.runmotor("R", "BACKWARD", 100)
time.sleep(1)
quarky.stopmotor("L")
quarky.stopmotor("R")
def Left():
quarky.runmotor("L", "BACKWARD", 100)
quarky.runmotor("R", "FORWARD", 100)
time.sleep(1)
quarky.stopmotor("L")
quarky.stopmotor("R")
def Right():
quarky.runmotor("L", "FORWARD", 100)
quarky.runmotor("R", "BACKWARD", 100)
time.sleep(1)
quarky.stopmotor("L")
quarky.stopmotor("R")
Forward()
Backward()
Left()
Right()