-
Notifications
You must be signed in to change notification settings - Fork 17
/
2nd_assignment_main.py
38 lines (29 loc) · 1.1 KB
/
2nd_assignment_main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#########################################################################
# Date: 2018/10/02
# file name: 2nd_assignment_main.py
# Purpose: this code has been generated for the 4 wheel drive body
# moving object to perform the project with line detector
# this code is used for the student only
#########################################################################
from car import Car
import time
class myCar(object):
def __init__(self, car_name):
self.car = Car(car_name)
def drive_parking(self):
self.car.drive_parking()
# =======================================================================
# 2ND_ASSIGNMENT_CODE
# Complete the code to perform Second Assignment
# =======================================================================
def car_startup(self):
# implement the assignment code here
pass
if __name__ == "__main__":
try:
myCar = myCar("CarName")
myCar.car_startup()
except KeyboardInterrupt:
# when the Ctrl+C key has been pressed,
# the moving object will be stopped
myCar.drive_parking()