Class1 [Beginner] Code Challenge: Classes 1. Setting Up Our Robot Create a new class called DriveBot Set up a basic constructor (no parameters needed) Initialize three instance variables within our constructor which all default to 0: motor_speed, direction, and sensor_range class DriveBot: def __init__(self, motor_speed=0, sensor_range=0, direction=0): self.motor_speed = motor_speed self.direction = direction self.sensor_range = sensor_.. 2022. 8. 13. 이전 1 다음