我的答案是:
class vehicle:
dis_A_B = 100
dis_B_C = 200
def time(self, speed):
time_A_B = self.dis_A_B / speed
time_B_C = self.dis_B_C / speed
print('time from A to B is %.2f hrs' % time_A_B)
print('time from B to C is %.2f hrs' % time_B_C)
car = vehicle()
car.time(60)