Are you sure?
Do you want to delete “Car-Bus Crash” permanently? You will not be able to undo this action.
import icons
background = Rectangle(color=['lightblue', 'turquoise', 'darkolivegreen','gray','darkslategray'])
myBus=icons.BusAlt(x=10, y=70, width=45, height=45)
myCar=icons.Car(color='darkgoldenrod', x=60, y=45,
height=7, width=7)
busLight=Ellipse(color='gold', x=23, y=80,
width=5, height=5)
busDriver=icons.AddressBook(x=18, y=67,
height=12, width=10)
#Create lists and variables
loopList=range(1,2)
colors = ['goldenrod', 'gold']
xCoordinates = [50,40]
yCoordinates = [50,82]
carHeight= [10,20]
carWidth= [10,20]
busLoop=range(10)
busX=[11,10,11,10,11,10,11,10,11,10]
busY=[71,70,71,70,71,70,71,70,71,70,]
for i in loopList :
with animation(duration=4):
myCar.color=colors[i]
myCar.x=xCoordinates[i]
myCar.y=yCoordinates[i]
myCar.height=carHeight[i]
myCar.width=carWidth[i]
for j in busLoop:
with animation(duration=1):
myBus.x=busX[j]
myBus.y=busY[j]