# Import the necessary modules from the ev3dev2 library from ev3dev2.motor import LargeMotor, OUTPUT_A, OUTPUT_D from time import sleep # Connect the motors to the EV3 brick motor_left = LargeMotor(OUTPUT_A) motor_right = LargeMotor(OUTPUT_D) # Move the robot forward for 5 seconds motor_left.on(50) motor_right.on(50) sleep(5) motor_left.off() motor_right.off()