Smart Car Programming Code Day3
Smart Car Programming Code Day3
Ex.no Code
go(20, 20, 5)
1-1 1 ----------------
left = 20
right = 20
time = 5
go(left, right, time)
2 go(-60, -60, 1)
3 go(20, 80, 2)
go(-10, -80, 2)
go(-100, 100, 3)
go(100, 20, 2)
4
go(-90, -20, 2)
go(60, -60, 2)
setTarget(1)
1-2 1 go(35, -100, 1)
go(-40, -40, 1.5)
setTarget(2)
go(-50, -50, 1)
go(20, -100, 1)
go(-40, -40, 1.5)
setTarget(3)
go(-50, -50, 2.4)
go(20, -100, 1)
go(-40, -40, 1.5)
setTarget(4)
2 set(225, 320, 270)
go(-100, -60, 1.8)
go(50, -50, 0.8)
go(50, 50, 0.4)
Ex.no Code
go(100, 100, 2.5)
2-1 1 go(50, -51, 1.3)
go_and_turn()
go_and_turn()
go_and_turn()
go_and_turn()
go(50, 50, 1)
2-2 1 turn_angle(60)
go(50, 50, 1)
turn_angle(60)
go(50, 50, 1)
turn_angle(60)
go(50, 50, 1)
turn_angle(60)
go(50, 50, 1)
turn_angle(60)
go(50, 50, 1)
turn_angle(60)
def side():
2 go(50, 50, 1)
turn_angle(60)
side()
side()
side()
side()
side()
side()
def side():
3 go(50, 50, 3)
turn_angle(120)
side()
side()
side()
-------
def side():
go(50, 50, 1)
turn_angle(72)
side()
side()
side()
side()
side()
-------
def side():
go(50, 50, 1)
turn_angle(60)
side()
side()
side()
side()
side()
side()
-------
def side():
go(50, 50, 1)
turn_angle(45)
side()
side()
side()
side()
side()
side()
side()
side()
Ex.no Code
for i in [1, 2, 3, 4]:
3-1 1 go(100, 100, 2.5)
turn_angle(90)
for i in range(10):
2 print(i)
------
for i in range(5, 10):
print(i)
------
for i in range(3):
2 go(50, 50, 3)
turn_angle(120)
-------------
for i in range(5):
go(50, 50, 1)
turn_angle(72)
-------------
for i in range(6):
go(50, 50, 1)
turn_angle(60)
-------------
for i in range(8):
go(50, 50, 1)
turn_angle(45)