...

Car Tuning

In this lesson, we will be working collaboratively as a team to tune and customise a car using Python and turtle graphics. Each student will have individual tasks to add unique details such as windows, lights, stripes, wheels, spoilers, and more, resulting in a colourful and personalised car design.
As part of this project you will learn:

What is Teamwork?

Teamwork in development means that everyone in the team works together to build something amazing, like a computer program or a game. Each person has a specific role and they share their ideas and help each other. By working as a team, they can create something even better than what they could do alone. It's like when friends play together and use their different skills to win a game, but instead of a game, they are building something cool on the computer!

Benefits of teamwork:

  • Division of Tasks: In a team, tasks can be divided among members based on their strengths and interests. This allows each member to contribute their skills effectively and feel valued for their individual abilities.
  • Accomplishing More Together: By combining efforts, development team can achieve more than if they could on their own. Team can tackle bigger challenges, solve problems collectively.
  • Learning from Each Other: Being part of a team allows you to learn from your teammates. You can share your knowledge and skills, and also learn new things from others.
  • Developing Problem-Solving Skills: When you work as a team, you learn how to solve problems together. You can brainstorm ideas, discuss different approaches, and find the best solutions. This helps you become a better problem solver, which is a valuable skill in many areas of life.
Next
Coordinates and Grid

Now, let's understand how we position our turtle on the canvas.

We have a grid that represents our canvas, and each square on the grid will corresponds to 10x10 pixels.

We use coordinates to specify the location of our turtle. Coordinates consist of two parts: the x-coordinate and the y-coordinate. The x-coordinate represents the horizontal position, while the y-coordinate represents the vertical position.

Think of coordinates as a set of numbers that tell us where to go.

The origin, (0, 0), is at the middle of the grid. We can use the 'goto' command to move our turtle to any specific coordinates on the grid, whether they are positive or negative values.


Prev Next
Please ensure all required fields are filled in
Let's explore Turtle Functions

We will be using the following Turtle commands to bring our drawings to life:

  • speed(number) - set the speed of your drawing from 0 to 10
  • penup() - This command lifts the turtle's writing pen, so it won't leave a trace while moving.
  • pendown() - With this command, we put the turtle's writing pen back down, allowing it to draw on the screen.
  • goto(x,y) - Use this command to navigate the turtle to a specific coordinate on the screen. The (x, y) values represent the horizontal and vertical positions.
  • color("colourName") - This command sets the colour of the turtle's pen or fill to the specified colour name, such as "blue" in our case.
  • begin_fill() and end_fill() - These commands mark the beginning and end of the shape that we want to fill with the selected colour.
  • forward(number) - Use this command to move the turtle forward by a specified number of pixels.
  • right(angle) and left(angle) - These commands allow the turtle to turn right or left by the specified angle.
  • circle(radius) - Draw a circle with a specified radius.
  • pensize(number) - Adjust the thickness of the turtle's pen stroke.

Prev Next
Please ensure all required fields are filled in
Car Tuning Task

We are given a black car template

  • Follow the link to open the template: Open Template.

  • Each of you will have a specific task to add a unique detail to our black car. Here are your individual tasks:

    • Task 1: Add windows to the car
    • Task 2: Design and add wheels to the car
    • Task 3: Add headlights and taillights
    • Task 4: Create and attach front and rear bumpers
    • Task 5: Install a roof rack for additional storage options.
    • Task 6: Add racing stripes along the length of the car.
    • Task 7: Design and add custom badges or emblems to the car.
    • Task 8: Design and add doors to the car
    • Task 9: Design and add side mirrors to the car
    • Task 10: Create and attach a rear spoiler to the car's trunk to enhance its sporty appearance.

    Prev Next
    Please ensure all required fields are filled in
    The Coding Session Open Template

    Now it's time to bring your ideas to life! Open your trinket template Open Template and start working on your assigned task.

    Use the turtle graphics commands we've learned to implement your designs. Don't be afraid to experiment with different colours, shapes, and sizes to make your additions stand out.

    Remember to test your code frequently by running it and making adjustments as needed.

    Prev Next
    Please ensure all required fields are filled in
    Save and Submit your work

  • If you don't have a Trinket account, click the down arrow and then click Link. This will give you a link that you can save and come back to later.
  • If you have a Trinket account, you can click Remix to save your own copy of the trinket.
  • At the end we will gather all the completed code pieces from each of you. Together, we'll merge them into one complete code for our car.

    Prev Next
    Complete and Share

    Submit your final project



    Copy your Trinket Url

  • Click Share->Link
  • Copy the link to share your code
  • Paste link into the field
  • Prev