Essential Question: How can I use objects to create a game where each object has different properties?
Mastery Objectives:
SWBAT Write for loops in Python
SWBAT Use random numbers in Python
SWBAT Draw lines in different colours with Python Turtle
Do Now: Write a Python program to calculate number of days between two dates.
Sample dates : (2014, 7, 2), (2014, 7, 11)
Expected output : 9 days
from datetime import date
f_date = date(2014, 7, 2)
l_date = date(2014, 7, 11)
delta = l_date - f_date
print(delta.days)
Directions: Create a program using the turtle library that races instances of turtles that race across the screen. https://projects.raspberrypi.org/en/projects/turtle-race
Requirements:
4 turtles in different colors
Complete the challenge, make the turtles spin at the end.
Create a race track with dotted lines
Ticket-to-Leave:
In the comments below, create turtle function and give it a name.